PDA

View Full Version : [SOLVED] change document root in lamp



chuchi
September 21st, 2012, 11:16 AM
Hi there!! I can not change the document Root in apache (LAMP). I follow the steps in https://help.ubuntu.com/community/ApacheMySQLPHP#Virtual_Hosts.

I change the default "/www/var" to "/home/jesus/Dropbox/htdocs/" in the file "mysite" (copy of default).

But when I type the url: "localhost/index.html" I get the error message:



Forbidden

You don't have permission to access /index.html on this server.


And I am pretty sure index.html exists.

What's the problem??

Thank you very much!!

Lars Noodén
September 21st, 2012, 11:30 AM
Have you checked that Other has read permissions to those directories?



chmod o=rx /home/jesus/Dropbox/htdocs/
chmod o=rx /home/jesus/Dropbox/
chmod o=rx /home/jesus/



Then you also need to have set Directory (http://httpd.apache.org/docs/2.2/mod/core.html#directory) permissions in Apache for the relevant virtual host's configuration file.




<Directory /home/jesus/Dropbox/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

chuchi
September 21st, 2012, 12:05 PM
HI Lars Noodén!!! Now it works!!!! you are right, it was a permission problem!! Thank you very very much!!