Following problem:
I have an ubuntu 12.04 server I made a virtual host with
DocumentRoot /var/www/
Everything is fine, I see the correct index.html when I point with webrowser to the website of this virtual host. When I look to the owner of the www folder I see:
ls -l
drwxr-xr-x 2 root root 4096 Jul 10 09:07 www
Now I change the DocumentRoot to
DocumentRoot /root/testFolder/
I copy my index.html in this folder, point with webrowser to my domain, then I get the message "You don't have the permission..."
Ok, I check the owner of testFolder
ls -l
drwxr-xr-x 2 root root 4096 Jul 11 08:18 testFolder
It is the same as www folder.
Ok my next try to change the group owner of testFolder
chown -R www-data:www-data /root/testFolder/
But I get the same result in my browser: "You don't have permission to access / on this server."
Try:
and
UPDATE
The solution in this specific case was to move apache from under /root into a folder that doesn't require root privileges.