I did some modifications to my apache server. And I created a symbol link to the use a larger storage space driver. But after that, I found my apache threw an 403 error. And after check the apache error_log file, I found an error said: [error] [client 10.100.0.15] Symbolic link not allowed: /var/www/html/test. I was curious about this, because we had another server with the same configuration and same symbol link under /var/www/html/ directory. Why the behaviors are so different?
To resolve the symbol link not allow problem, I change the httpd configuration from:
Options FollowSymLinks
Options Indexes FollowSymLinks
to
Options +FollowSymLinks
Options Indexes +FollowSymLinks
in the DocumentRoot directory definition part.
But it dosn't work. So I did more google. And in one forum somebody said this is because the SeLinux problem, I need to disable SELinux to resolve this problem.
To disable SELinux, we can temporarily disable or permanently disable it:
a. temp
You'll need to be logged in as root, and in the sysadm_r role:
newrole -r sysadm_r
and then
echo 0 >/selinux/enforce
To switch back into enforcing mode:
echo 1 >/selinux/enforce
b. permanently
edit /etc/selinux/config and change SELINUX=enforcing to SELINUX=permissive
For more detail, please check this artical :
How to disable SELinuxThanks