nginx - 200 连接()到 unix :/tmp/uwsgi. socks 失败

标签 nginx amazon-ec2 uwsgi

我正在 EC2 上使用 uwsgi 配置 nginx,我已检查文件中的日志/var/log/nginx/error.log .

我收到此错误:

200 connect() to unix:/tmp/uwsgi.sock failed (2: No such file or directory) while connecting to upstream



我的 uwsgi.sock 位置是 /var/www/myapp/
如何从 uwsgi://unix:/tmp/uwsgi.sock 更改文件位置至 uwsgi://unix:/var/www/myapp/在配置中?

最佳答案

这可能是经典命名空间 Temp 的问题,请参阅:http://fedoraproject.org/wiki/Features/ServicesPrivateTmp

但是您提到您已将 sock 位置设置为您的应用程序目录,您是否在该虚拟主机的 nginx 配置中完成了此操作?您肯定需要重新启动 Web 服务器才能使更改生效。

请引用此问题及其答案,这在这种情况下可能有用。
Got 'No such file or directory' error while configuring nginx and uwsgi

请引用 nginx.conf 文件中的部分, uwsgi_pass 提到。如果您没有进行这样的更改,请这样做并重新启动网络服务器。我认为这必须解决问题。

关于nginx - 200 连接()到 unix :/tmp/uwsgi. socks 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30820141/

相关文章:

amazon-ec2 - Terraform 失败 remote-exec (aws/ec2)

node.js - 通过 Route 53 内的域指向 EC2 实例并超时

linux - EC2 上最新的 linux 内核是什么?

python - 如何在uWSGI下调试python应用程序?

php - SSL 证书问题 : self signed certificate

django - vue.js 和 django 中的访问控制允许来源问题

python - 在带有 uwsgi 的 flask 应用程序中使用 mysql-connector-python 并收到以下错误 : SSL connection error: SSL_CTX_new failed

python - 编译UWSGI Empire_mongodb插件

tomcat - 带有tomcat(moqui)的Nginx SSL无法稳定地运行带有https地址的moqui

svn - 502 Bad Gateway with nginx + apache + subversion + ssl (SVN COPY)