On centos 7 with nginx 1.10.2 and uwsgi 2.0.14
When I configure uwsgi to open a socket in /var/tmp/uwsgi or in /tmp, I go a message from nginx saying it cannot find the socket file :
2017/06/07 16:54:53 [crit] 2642#0: *7 connect() to unix:///tmp/mywebsite.socket failed (2: No such file or directory) while connecting to upstream, client: 108.162.245.185, server: _, request: "GET /share/3years/music/guitarists/django_reinhardt HTTP/1.1", upstream: "uwsgi://unix:///tmp/mywebsite.socket:", host: "mywebsite.com"
2017/06/07 17:22:11 [crit] 1327#0: *2 connect() to unix:///var/tmp/uwsgi/mywebsite.socket failed (2: No such file or directory) while connecting to upstream, client: 5.158.200.123, server: _, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///var/tmp/uwsgi/mywebsite.socket:", host: "mywebsite.com"
If I use "unix:///var/uwsgi/mywebsite.socket" (without '/tmp/') there is no problem at all. In three cases directories are in 1777, the socket file permissions give read/write access to nginx user and nginx socket path match uwsgi socket path in configuration files. SELinux is disabled.
So why I cannot use /var/tmp or /tmp to create a socket for nginx/uwsgi : many examples said it was possible ?