nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /etc/nginx/sites-enabled/django_direct:12
Run Code Online (Sandbox Code Playgroud)
我的 nginx 配置文件:
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;
}
}
Run Code Online (Sandbox Code Playgroud)
我该怎么办? UPD: 我已经改变了这样的文件:
proxy_pass http://unix:/root/django_direct/django_direct.sock;
Run Code Online (Sandbox Code Playgroud)
但没有帮助,我已经重新启动了 nginx,现在我收到了 502 Bad Gateway 错误。
您的论点是错误的。\n它需要一个 URL:
\n\n\n\n\n设置代理服务器的协议和地址以及位置应映射到的可选 URI。作为协议,可以指定 \xe2\x80\x9chttp\xe2\x80\x9d 或 \xe2\x80\x9chttps\xe2\x80\x9d。地址可以指定为域名或 IP 地址,以及可选端口:
\n\nproxy_pass http://localhost:8000/uri/ ;
\n\n或者作为在单词 \xe2\x80\x9cunix\xe2\x80\x9d 之后指定并用冒号括起来的 UNIX 域套接字路径:
\n\nproxy_pass http://unix:/tmp/backend.socket:/uri/ ;
\n
请参阅文档:http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
\n| 归档时间: |
|
| 查看次数: |
11033 次 |
| 最近记录: |