CentOS: 将NGINX加到SELinux的允许名单

用NGINX经常出现502 Bad gateway错误。一般来说是由于SELinux阻挡造成的。运行下面语句,把NGINX加入SELinux的允许名单,就会少些麻烦。

 

yum install policycoreutils-python  
cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M mynginx  
semodule -i mynginx.pp  

 

转自:http://my.csdn.net/dogfish

posted @ 2016-12-29 10:41  Null98  阅读(1169)  评论(0编辑  收藏  举报