nginx更新配置后502
最近在捣鼓ng,发现每次更新配置文件后,就会502
nginx -s reload
解决办法:
1:永久关闭selinux
[root@localhost ~]# vim /etc/sysconfig/selinux
SELINUX=enforcing 改为 SELINUX=disabled
2:我们需要将Nginx添加至SELinux的白名单
yum install policycoreutils-python sudo cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M mynginx sudo semodule -i mynginx.pp