I have some websites that some are in php and others in nodejs however all will be sub folders of misrv177 domain
my configuration is as follows
default
server {
listen 80;
listen [::]:80;
root /var/www/html/;
server_name misrv177;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.html index.htm index.nginx-debian.html index.php;
}
frontend
server {
listen 80;
listen [::]:80;
root /var/www/html/gemeos-frontend/dist;
server_name misrv177;
access_log /var/log/nginx/gemeos-frontend-access.log;
error_log /var/log/nginx/gemeos-frontend-error.log;
index index.html index.htm index.nginx-debian.html index.php;
location ^~/gemeos {
proxy_pass http://localhost:3000;
}
}
backend
server {
listen 80;
listen [::]:80;
root /var/www/html/gemeos-backend/public;
server_name misrv177;
access_log /var/log/nginx/gemeos-backend-access.log;
error_log /var/log/nginx/gemeos-backend-error.log;
index index.html index.htm index.nginx-debian.html index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
When I try to access eg misrv177/gemeos it returns a 404 error
0 Answers