I have an NGINX reverse proxy with Apache running on Linux22. My goal is to serve a file in a new documentroot, but for whatever, the Nginx Default conf serves the old apache2 index file. The documentRoot is correctly specified and the path is correctly spelled, too.
ls /etc/nginx/sites-enabled/default
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
# root /var/www/html;
root /var/www/clients/client0/web1/web;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
proxy_pass http://IP:8090/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
100-DOMAIN.vhost
<Directory /var/www/DOMAIN>
AllowOverride None
Require all denied
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/clients/client0/web1/web
ServerName DOMAIN
ServerAdmin webmaster@DOMAIN
ErrorLog /var/log/ispconfig/httpd/DOMAIN/error.log
Alias /error/ "/var/www/DOMAIN/web/error/"
Worthy to mention, that I strongly assume that since it goes after the default server, it checks the vhost configurations per order. I have two more vhosts starting both with 000... Is this the issue? If yes, what can I do to fix it? Thanks!
proxy_pass http://IP:8090/;
and you quote an Apache config for port 80<VirtualHost *:80>
so I am more confused than you now