Ale*_*lig 4 django nginx gunicorn
我正在使用nginx
和开发一个django驱动的应用程序gunicorn
.一切都很好,直到今天我试图重新启动nginx
失败.所以我用sudo nginx -t
命令测试它,我得到了这个错误.
nginx: [emerg] host not found in "localhost:8004" of the "listen" directive in
/etc/nginx/sites-enabled/808:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Run Code Online (Sandbox Code Playgroud)
这是808
配置文件内容:
server {
listen localhost:8004;
error_log /var/www/html/burger808/error.log;
location / {
proxy_pass http://127.0.0.1:8005;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
location /static/ {
autoindex on;
alias /var/www/html/burger808/burger808/static/;
}
location /media/ {
autoindex on;
alias /var/www/html/burger808/burger808/media/;
}
}
Run Code Online (Sandbox Code Playgroud)
我认为这可能与8004
端口有些冲突.所以我检查了其他congfig文件,没有冲突.
我想知道什么可能导致这个错误?
归档时间: |
|
查看次数: |
4121 次 |
最近记录: |