nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /etc/nginx/sites-enabled/django_direct:12
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;
}
}
What do I do? UPD: I have changed file like this:
proxy_pass http://unix:/root/django_direct/django_direct.sock;
But didn't help, I've restarted nginx and now I am getting now a 502 Bad Gateway error.
Your argument is wrong. It needs an URL:
See the documentation: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
Well the nginx sees two parameters:
unix
, and/root/django_redirect/...
. I have the idea however that you want to specify a UNIX domain socket path. You can do this with:As is described in the documentation.