Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am trying to set up a couple ov VritualHost in my Apache, but I would like to put the DocumentRoot of these virtual host on folders outside the basic www folder. It happens that I get alwasy "Permission Denied". My httpd.conf follows: NameVirtualHost *:80

         <VirtualHost *:80>
              DocumentRoot /home/giuseppe/www

              ErrorLog logs/host.www.projects-error_log
              CustomLog logs/ common

         <Directory "/home/giuseppe/www">
             Options Indexes FollowSymLinks
             AllowOverride All
             Order allow,deny
             Allow from all


        <VirtualHost *:80>
             DocumentRoot /home/developper

             ErrorLog logs/host.developper-error_log
             CustomLog logs/ common


I tried to change the user group permission to www folder. But no success. I think the problem is ServerName.

 VirtualHost A

 VirtualHost B

Maybe ServerName must be a valid DNS? Like and, and not a simple

share|improve this question

migrated from Jun 25 '11 at 13:39

This question came from our site for professional and enthusiast programmers.

Where are your docs stored? How are you linking the docs? With a symlink? although you have FollowSymLinks you may need another <Directory> defintion to allow access to those files. – Drav Sloan Jun 24 '11 at 15:28

You can put your DocumentRoot where you want, no special restrictions on that.

So as stated by the error message your problem is only with file & directories rights.

The apache user must be able to walk to these documentRoots and to read files there. So you should adjust several things:

  • check that either the apache user or group as read access on directories and files inside this directory
  • check that he's got the execution right on all parents directories
  • check that you do not have SELinux or such security tools adding some more constraints (check the apache logs and system logs)
share|improve this answer

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.