【发布时间】:2017-11-03 06:23:01
【问题描述】:
我在学习
上的教程时遇到了我的 engine-X 的权限问题http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
我尝试了在类似问题中找到的建议解决方法,但没有任何帮助。 (将 Selinux 设置为 permissive,为 uwsgi 添加 chmods 甚至以 root 身份运行 nginx)
这是来自 nginx error.log 的错误转储 有人有什么想法吗?如果无法修复,我可能不会将 nginx 与 virtualenv 一起使用。
[crit] 3123#0: *3 connect() to unix:///home/mb/uwsgi-tutorial/mysite mysite.sock failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: 127.0.0.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/mb/uwsgi-tutorial/mysite/mysite.sock:", host: "localhost:8000"
编辑:禁用 SELinux 解决了 TCP_socket 的问题(这显然是个问题),然后一切正常。
禁用 SELinux 并不能解决 Unix_domain 套接字的权限问题 即使使用 chmod 777 也不允许 Nxinx 使用套接字(我知道不应该这样做)。
【问题讨论】:
标签: django sockets nginx permissions unix-socket