Set SELinux file context label recursively and persistently
semanage fcontext -a -t label_t "/path/to/dir(/.*)?"
restorecon -Rv /path/to/dir
Create SELinux module file based on fails in audit log and install it
grep <process> /var/log/audit/audit.log | audit2allow -M <output>
semodule -i <output>.pp
Look for denials in the audit log
ausearch -sv no --comm php-fpm
List all SELinux rules, probably want to grep on this
semanage fcontext -l | grep '/var/www'
Show SELinux boolean settings
getsebool -a
Allow httpd to connect to databases over the network
setsebool -P httpd_can_network_connect_db 1