部署gunicorn & nginx, socket权限问题

因为本博客升级到Python3 + Django2.1,重新部署时Nginx一直报502(部署参考:这里),查nginx日志显示:

2018/04/04 10:54:03 [crit] 14238#0: *4 connect() to unix:/home/username/my_project/my_project.sock failed (13: Permission denied) while connecting to upstream client: 192.168.66.50, server: 192.168.66.106, request: "GET / HTTP/1.1", upstream: "http://unix:/home/username/my_project/my_project.sock:/", host: "192.168.66.106"

设置了半天权限不得解,

奶奶的,最后两行命令搞定:

sudo yum install policycoreutils-python 
sudo semanage permissive -a httpd_t 

来源:点这里

我本程序猿,这博客里貌似全是这种部署啊安装啊的记录了...

For example, "name@something.com". If someone replies to you it will be via email.
For example, "http://someaddress.com"