Nginx 提供错误的 DocumentRoot

Nginx 提供错误的 DocumentRoot

我有一个在 Linux22 上运行 Apache 的 NGINX 反向代理。我的目标是在新的 documentroot 中提供文件,但无论如何,Nginx Default conf 都会提供旧的 apache2 索引文件。documentRoot 指定正确,路径拼写也正确。

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/"

值得一提的是,我强烈认为,由于它追踪默认服务器,因此它会按顺序检查虚拟主机配置。我还有两个虚拟主机,都以 000 开头……这是问题吗?如果是,我该怎么做才能修复它?谢谢!

相关内容