I keep getting this error when I restart
DocumentRoot does not exist
What else can I do besides disable editing
/etc/sysconfig/selinux to fix it?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Open /etc/selinux/targeted/booleans file using a text editor:
# vi /etc/selinux/targeted/booleans
Append or modify value for httpd_disable_trans as follows:
Save and close the file. Type the following two commands:
# setsebool httpd_disable_trans 1 # /etc/init.d/httpd restart
PostInstallerF may help you
You can take help from the following resources
Don't disable SELinux. That's just asking for trouble.
As for solving the problem, I'm just going to quote myself here:
It appears you've created a new directory outside the standard filesystem hierarchy to hold your web documents.
When you do this, SELinux is not aware of your custom directory structure, and doesn't know that Apache (httpd) should have access to it. You will see messages in
/var/log/audit/audit.log showing denials in this case.
To actually fix the problem, you need to tell SELinux that Apache can access the directory. Do this using the semanage fcontext command:
semanage fcontext -a -t httpd_sys_content_t "/volume1/web(/.*)?"
The pattern matching is done with regular expressions, so this will match
/volume1/web and everything below it. The fact that it uses regular expressions also means you need to quote it as shown above.
Then relabel the files:
restorecon -r -v /volume1/web
SELinux will now permit Apache to access files in