问题原文
原帖链接 · jeffgoku · CC BY-SA 3.0
I use fedora 17, and when I setup nginx with uwsgi using unix domain socket, when I place the socket in a directory with proper permission it's ok, but when I place the socket in the /tmp it will cause nginx error:
connect() to unix:/tmp/MySite.sock failed (2: No such file or directory) while connecting to upstream
The file does exist and has read/write permission for nginx user. But what cause this error, its really drive me crazy, can somebody figure it out.
已采纳解答
原帖链接 · Michael Hampton · CC BY-SA 3.0
You can't place sockets intended for interprocess communication in /tmp.
For security reasons, recent versions of Fedora use namespaced temporary directories, meaning every service sees a completely different /tmp and can only see its own files in that directory.
To resolve the issue, place the socket in a different directory, such as /run (formerly known as /var/run).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
