Welcome to the Linux Foundation Forum!

Apache configuration

Hi.

I've installed apache with php under Ubuntu 10.10. I need to change the DocumentRoot to a directory other than /var/www/ which is the default, but I get "Forbidden" message.

With /var/www/ everything is ok, I can also copy web directories to it and execute php codes, but it doesn't work at all for the other address, say /media/drive2/.

I even set permissions for /media/drive2/htdocs/ and all of it's children to 777(!) but I still get the same "forbidden" error.

Please help!

Thanks

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 2,177
    Are you still trying to get apache to read and use your windows based ntfs partition?
  • No!
    the /media/drive2/ is an EXT4 drive, I can see permissions assigned to my htdocs directory.
    I also use terminal for more assurance.
  • Posts: 2,177
    I was able to clone the contents of /var/www into a new directory /http/www and get it to work with minimal issues, the only issue was when I forgot the httdocs portion of the DocumentRoot option which value the same error message you are experiencing.

    Below if the old and new working value of the DocuementRoot option:
    1. #DocumentRoot "/srv/httpd/htdocs"
    2. DocumentRoot "/http/www/htdocs"

    In addition I had to change the Directory option a few lines below, shown below are the old and new values for that option:
    1. # This should be changed to whatever you set DocumentRoot to.
    2. #
    3. #<Directory "/srv/httpd/htdocs">
    4. <Directory "/http/www/htdocs">

    Have you confirmed the that paths above are pointing to the correct locations? In addition can you post the ls -la output from you new www directory and htdocs directories here?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training