Nginx配置允许无域名访问

2024-05-14 22:57:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Digital Ocean上部署了一个Django应用程序。我的nginx配置设置看起来非常类似(取自here):

server {
    listen 80;
    server_name example.com www.example.com;

    location = /favicon.ico { access_log off; log_not_found off; }

    location /static/ {
            alias /root/djtrump/static/;
    }

    location / {
            include proxy_params;
            proxy_pass http://www.example.com:8030;
    }
}

问题是www.example.com带到我的网站example.com网站不。浏览器中显示的错误是无法访问站点。你知道吗

可能的错误和解决相同问题所需的配置是什么?你知道吗


Tags: djangocomlogserver网站example部署www

热门问题