I have installed Apache 2.4.6 on my server and have the following virtual host config:
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName foobar1.com DocumentRoot /home/john/foobar1/foobar1.com <Directory /home/john/foobar1/foobar1.com> Options -Indexes +FollowSymLinks +MultiViews Require local AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /home/john/foobar1/logfiles/error.log LogLevel warn CustomLog /home/john/foobar1/logfiles/access.log combined </VirtualHost>
Whenever I try and view http://foobar1.com (I have added 127.0.0.1 foobar1.com to my hosts file) I get the following error:
[core:error] [pid 23238] (13)Permission denied: [client 127.0.0.1:49853] AH00035: access to / denied (filesystem path '/home/john/foobar1/foobar1.com') because search permissions are missing on a component of the path
The file belong to user "john" and are in the group "john" too. The permissions I used are: chmod -R go-rwx (for the document root) chmod -R g+rw (for the document root) chmod -R o+r (for the document root)
I can only view my site when I set the file permissions to 777... something I know is a major security weakness. Why can I only view my site with the 777 setting?