WordPress and SELinux

The blag has moved again and this time I wanted to leave SELinux enabled. Everything pretty much worked “out of the box” except for the Redis plugin this site uses wasn’t able to connect to the Redis service. Searching the SELinux audit log revealed that the following setting needed to be enabled to allow Nginx to connect to Redis over PHP:
$ sudo setsebool -P httpd_can_network_connect 1
To update WordPress without having to use FTP, PHP-FPM needs full access to all files with the httpd_sys_content_t context:
$ sudo setsebool -P httpd_unified 1

Leave a Reply

Your email address will not be published. Required fields are marked *