The 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 to the website of this virtual host with a web browser. When I look at the owner of the www folder , I see:
ls -l
drwxr-xr-x 2 root root 4096 Jul 10 09:07 www
Now I am changing DocumentRoot to
DocumentRoot /root/testFolder/
I copy my index.html in this folder, point it to my domain using a web browser, then I get the message "You do not have permission ..."
Ok i check the owner of testFolder
ls -l
drwxr-xr-x 2 root root 4096 Jul 11 08:18 testFolder
This is the same as the www folder.
Ok, I’ll try to change the owner of the testFolder group.
chown -R www-data:www-data /root/testFolder/
But I get the same result in my browser: "You do not have permission to access this server."
source
share