SELinux Commands
getenforce
setenforce Permissive
setenforce Enforcing
To allow nginx access to specific folder
chcon -Rt httpd_sys_content_t /var/www/
Log file : /var/log/audit/audit.log
Reference:
- http://wiki.centos.org/HowTos/SELinux
- http://axilleas.me/en/blog/2013/selinux-policy-for-nginx-and-gitlab-unix-socket-in-fedora-19/
- https://gist.github.com/dnozay/3869050
- http://stackoverflow.com/questions/6795350/nginx-403-forbidden-for-all-files
- http://stackoverflow.com/questions/22586166/why-does-nginx-return-a-403-even-though-all-permissions-are-set-properly#answer-26228135