Find the answer to your Linux question:
Results 1 to 2 of 2
Hi there!! I can not change the document Root in apache (LAMP). I follow the steps in https://help.ubuntu.com/community/Ap...#Virtual_Hosts . I change the default "/www/var" to "/home/jesus/Dropbox/htdocs/" in the file "mysite" ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Nov 2009
    Posts
    104

    change document root in lamp


    Hi there!! I can not change the document Root in apache (LAMP). I follow the steps in https://help.ubuntu.com/community/Ap...#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:

    Code:
    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!!

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,914
    You need to add a <Directory ...> section in your apache's .conf file for the service. There should already be one in there for the default directory that was the previous document root. The same permissions will probably be needed. Don't forget to restart apache after you've done this.

    You may still get the same warning even after doing this. Adding the <Directory ...> section tells apache to allow connections to request files from that directory. The apache user still needs filesystem read privileges to be able to read files from there before sending them out, so check that if adding the <Directory ...> section on its own doesn't work.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •