Теперь передняя часть работает нормально и доступен через мой URL, однако API Backend не работает - я получаю 404 ошибки.
Код: Выделить всё
server {
listen 443 ssl;
server_name my_ip myurl.de www.myurl.de;
root /var/www/html/dist;
index index.html;
ssl_certificate /etc/nginx/cert.cer;
ssl_certificate_key /etc/nginx/prvt.key;
location / {
try_files $uri $uri/ /index.html;
}
location /3rdpartylicenses.txt {
alias /var/www/html/dist/3rdpartylicenses.txt;
}
location /assets {
alias /var/www/html/dist/assets;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /index.nginx-debian.html {
log_not_found off;
access_log off;
}
location ^~ /api {
root /backend/LeagueOf5v5Backend/public;
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock; # Adjust the PHP-FPM socket path if needed
}
location ~ /\.ht {
deny all;
}
error_page 404 /index.html;
# Additional Nginx configuration settings can go here.
}
Любая справка оценена!>
Подробнее здесь: https://stackoverflow.com/questions/772 ... pi-backend