Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

I've created:

  • /home/ec2-user/sites
  • /home/ec2-user/sites/
  • /home/ec2-user/logs

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 "/home/ec2-user/sites">
        Options Indexes
        Order Allow,Deny
        Allow from All
        # Any other directory-specific stuff

    <Directory "/home/ec2-user/">
        Order Allow,Deny
        Allow from All
        # Any other directory-specific stuff

    # Default for when no domain name is given (i.e. access by IP address)

    <VirtualHost *:80>
       DocumentRoot /home/ec2-user/sites
       ErrorLog /home/ec2-user/logs/error_log
       TransferLog /home/ec2-user/logs/access_log

    # Add a VirtualHost definition for your domain which was once the system default.

       DocumentRoot /home/ec2-user/sites/
       ErrorLog /home/ec2-user/logs/
       TransferLog /home/ec2-user/logs/

In the error logs, I'm just getting:

Sun Dec 11 02:50:11 2011] [error] [client] (13)Permission denied: access to / denied
[Sun Dec 11 02:50:14 2011] [error] [client] (13)Permission denied: access to / denied
[Sun Dec 11 02:54:27 2011] [error] [client] (13)Permission denied: access to / denied
[Sun Dec 11 02:54:32 2011] [error] [client] (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.

share|improve this question
If you access the index.html does the error message change? – becomingwisest Dec 11 '11 at 3:35
up vote 1 down vote accepted

Is your whole tree of dirs set to 777?

chmod 755 the parent directorys

share|improve this answer
thanks -- that did it. so obvious it would've been days before I thought of it. :) – John Carter Dec 11 '11 at 3:35

Also you might want to look into modifying or disabling selinux


share|improve this answer
I doubt selinux is the issue in this case because apache has been able to write to the log files. Otherwise that would have been my guess. – becomingwisest Dec 11 '11 at 3:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.