I'm configuring Apache myself, and trying to force myself to (re-)learn the configuration process. It's been a long time!
Version is Apache/2.2.21 running on Amazon Linux
I'm planning on running a few sites from this server.
The first two contain index.html files. In the process of my experimentation, I've set my tree to 777 without any success, and have changed ownership and groups for directories and files to apache (which is what is sent in httpd.conf).
I've chopped out some relevant parts of my httpd.conf file:
DirectoryIndex index.html index.html.var DocumentRoot "/home/ec2-user/sites" <Directory "/"> Options None AllowOverride None </Directory> <Directory "/home/ec2-user/sites"> Options Indexes Order Allow,Deny Allow from All # Any other directory-specific stuff </Directory> <Directory "/home/ec2-user/www.domain.ca"> Order Allow,Deny Allow from All # Any other directory-specific stuff </Directory> # Default for when no domain name is given (i.e. access by IP address) <VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot /home/ec2-user/sites ErrorLog /home/ec2-user/logs/error_log TransferLog /home/ec2-user/logs/access_log </VirtualHost> # Add a VirtualHost definition for your domain which was once the system default. <VirtualHost www.domain.ca> ServerName www.domain.ca ServerAlias domain.ca ServerAdmin email@example.com DocumentRoot /home/ec2-user/sites/www.domain.ca ErrorLog /home/ec2-user/logs/domain.ca.error_log TransferLog /home/ec2-user/logs/domain.ca.access_log </VirtualHost>
In the error logs, I'm just getting:
Sun Dec 11 02:50:11 2011] [error] [client 184.108.40.206] (13)Permission denied: access to / denied [Sun Dec 11 02:50:14 2011] [error] [client 220.127.116.11] (13)Permission denied: access to / denied [Sun Dec 11 02:54:27 2011] [error] [client 18.104.22.168] (13)Permission denied: access to / denied [Sun Dec 11 02:54:32 2011] [error] [client 22.214.171.124] (13)Permission denied: access to / denied
Admittedly this isn't a very interesting question, but I'm stumped, and am now just flipping settings trying to determine what's causing the problem.