我的nginxconfiguration文件如下。
server { listen 80; server_name http://hg.rawdatatech.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /static/ { alias /home/home-garden/staticfiles/; } }
当我运行我的Django应用程序使用这个configuration,我看到“可疑的符号错误”和连接拒绝错误nginx错误日志。 我的configuration有错吗?
从server_nameconfiguration中删除http://
新的configuration将是这样的
server { listen 80; server_name hg.rawdatatech.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /static/ { alias /home/home-garden/staticfiles/; } }