WordPress:CentOS SELinux 設定

開啟SELinux,POST文章時空白、Autoptimize 跳錯權限..等問題

#semanage fcontext -a -t httpd_sys_content_t "/var/www/wordpress(/.*)?"
#semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wordpress/wp-content(/.*)?"
#semanage fcontext -a -t httpd_sys_rw_content_t /var/www/wordpress/.htaccess
#semanage fcontext -a -t httpd_sys_rw_content_t /var/www/wordpress/wp-config.php
#restorecon -R -v /var/www/wordpress/

查看一下SELinux 與httpd相關設定
#getsebool -a | grep 'httpd'

#setsebool -P httpd_can_network_connect_db on 

#setsebool -P httpd_can_network_connect on 

#setsebool -P httpd_unified on 
//If you want to unify HTTPD handling of all content files, you must turn on the httpd_unified boolean.

#setsebool -P httpd_can_sendmail on 

#setsebool -P httpd_setrlimit on 
//If you want to allow httpd daemon to change system limits, you must turn on the httpd_setrlimit boolean.

#setsebool -P httpd_execmem on 
//If you want to allow httpd scripts and modules execmem/execstack, you must turn on the httpd_execmem boolean.

httpd_selinux(8) – Linux man page
Nginx SELinux Configuration
WordPress Multisite 使用者註冊 收不到信 – httpd – php – selinux