Я пытаюсь добавить WordPress и phpmyadmin на мое фактическое доменное имя. Я не очень понимаю nginx конфиг. Я установил их. Но у меня есть проблема с Nginx config:
Я хочу, чтобы:
/ blog go для wordpress
/ phpmyadmin go в phpmyadmin
/ go на мою целевую страницу
все остальные go на мое reactJs приложение
server {
listen 80;
server_name example.com;
root /var/www/reactjs;
return 301 https://$host$request_uri;
index index.html index.htm;
# Any route that doesn't have a file extension (e.g. /devices)
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
# access_log logs/static.log; # I don't usually include a static log
}
location ~* \.(?:css|js)$ {
try_files $uri =404;
expires 1y;
access_log off;
add_header Cache-Control "public";
}
# Any route containing a file extension (e.g. /devicesfile.js)
location ~ ^.+\..+$ {
try_files $uri =404;
}
server {
server_name example.com;
listen 443 ssl;
listen [::]:443 ssl;
root /var/www/reactjs;
index index.php index.html index.htm;
location ~* /static/css {
try_files $uri $uri;
}
location ~* /static/js {
try_files $uri $uri;
}
location =/ {
root /var/www/landingpage;
try_files /index.html /index.html;
}
# Any route that doesn't have a file extension (e.g. /devices)
location / {
try_files $uri $uri/ /index.html;
}
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
}
Пожалуйста, вы можете мне помочь? С уважением,