nginx中"proxy_pass"中的参数个数无效指示 [英] nginx invalid number of arguments in "proxy_pass" directive
本文介绍了nginx中"proxy_pass"中的参数个数无效指示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /etc/nginx/sites-enabled/django_direct:12
我的nginx conf文件:
My nginx conf file:
server {
listen 80;
server_name 94.154.13.214;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /root/django_direct/main_app/;
}
location / {
include proxy_params;
proxy_pass unix: /root/django_direct/django_direct.sock;
}
}
我该怎么办? UPD: 我已更改了这样的文件:
What do I do? UPD: I have changed file like this:
proxy_pass http://unix:/root/django_direct/django_direct.sock;
但是没有帮助,我已经重新启动了Nginx,现在 我现在收到502 Bad Gateway错误.
But didn't help, I've restarted nginx and now I am getting now a 502 Bad Gateway error.
推荐答案
如果其他人发现了此错误并出现此错误.检查参数行的末尾是否有分号.适用于所有行,而不仅仅是proxy_pass.
If someone else finds this and has this error. Check that you have a semi-colon at the end of the parameters line. goes for all of the lines, not just proxy_pass.
这篇关于nginx中"proxy_pass"中的参数个数无效指示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文