我正在 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/