Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    change document root in lamp

    Hi there!! I can not change the document Root in apache (LAMP). I follow the steps in

    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:

    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
    Nottingham, England
    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

Posting Permissions

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