I am configuring Apache / 2.4.6 on a Centos 7 server. I have created a virtual host in the following way:
<VirtualHost {IP}:80->
ServerAdmin admin@localhost
DocumentRoot /home/monkey/site/public
ServerName www.monkey.net:80
ServerAlias monkey.net
ErrorLog /home/monkey/error.log
CustomLog /home/monkey/requests.log combined
</VirtualHost>
Also, (according to me) I established a directive to allow apache access to this folder:
<Directory "/home/monkey/site/public">
Allow from all
</Directory>
However, at the time of entering monkey.net I get the following error in the browser:
Forbidden
You do not have permission to access / on this server.
I proceeded to make some changes to see if it gave solution, but the error is still there:
/home/monkey/site/
to /home/monkey/site/public
with chmod 755
/ 777
. Set the directory type of site/
with the command:
chcon -h system_u:object_r:httpd_sys_content_t /home/monkey/site/public
Observing the logs I see that the error is detailed in the following way:
[core: error] [pid 7925] (13) Permission denied: [client 186.15.110.196:56917] AH00035: access to / denied (filesystem path '/ home / monkey / site') because search permissions are missing on a component of the path
Going around, basically what they recommend is doing what I have already done, but without positive results. I do not know if I'll be missing something. Greetings
Edition 1/29/2016 :
SELinux does not seem to be a barrier, since /var/log/audit/audit.log
does not show "access denied" messages. I can buy this by doing:
# ausearch -m AVC --start today -i
Regarding the permission of the directories, I have applied 644 to all the directories up to the root:
// 755 /home/monkey/site/public/index.php
4 -rwxr-xr-x index.php
// 644 /home/monkey/site/public/
0 drw-r--r-- 4 public
// 644 /home/monkey/site/
0 drw-r--r-- 4 site
...