Wednesday, June 29, 2011

SELinux + Apache

Found out the hard way that you need to change some things if you're trying to run apache with SELinux. I needed to run the following commands to get it to not show a 403 forbidden page:

setsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t /home/mike/pageDirectory

the first command allows httpd to serve pages that are in /home directories, the second sets the selinux context so that selinux allows those pages to be served

Thursday, June 2, 2011