Results 1 to 7 of 7

Thread: Apache2 403 Forbidden

  1. #1
    Join Date
    Aug 2011
    Beans
    4

    Apache2 403 Forbidden

    I have just installed ubuntu 11.04, and after some prodding about i have the system running as i want it, so want to add my www to it aswell.

    I found on the website for Gallery3, what i want to use the www for, this post http://gallery.menalto.com/node/99832.

    I ran that line to install apache and all other concerning and when connecting to localhost in the web browser i can see the it works message.

    Now the problem starts with me wanting to change the /var/www to /home/site/www.
    When i do this i keep getting forbidden. I have added the path into the httpd.conf, the default and used varaity of options seen about the options indexes etc.
    Furthermore i have tried with chown to set the site to root, www-data and my own account, but none worked.

    Could anyone plese help me to fix this.
    Thank you!

  2. #2
    Join Date
    Apr 2009
    Location
    Surrey, London
    Beans
    291
    Distro
    Ubuntu

    Re: Apache2 403 Forbidden

    i used to move the apache 2 directory to my home dir but you dont need to you can just create a symbolic link to the var/www

    Ln -s /path/to/real/file /path/to/location/of/link
    Ubuntu 18.04 VMs

  3. #3
    Join Date
    Aug 2011
    Beans
    4

    Re: Apache2 403 Forbidden

    I tried this...

    renamed the www to www.bak
    ln -s /home/site/www /var/www
    reloaded the browser and now i get 403 forbidden aswell

  4. #4
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Apache2 403 Forbidden

    Quote Originally Posted by ReneW View Post
    I tried this...

    renamed the www to www.bak
    ln -s /home/site/www /var/www
    reloaded the browser and now i get 403 forbidden aswell
    Here's how I do it sudo a2enmod userdir

  5. #5
    Join Date
    Aug 2011
    Beans
    4

    Re: Apache2 403 Forbidden

    Quote Originally Posted by wojox View Post
    Here's how I do it sudo a2enmod userdir
    I get the same results still... the /www/var still works, the /home doesnt

    is there maybe some kind of user or group stuff i have to fix / add or whatever in this new 11.04 version?

  6. #6
    Join Date
    Jan 2008
    Location
    Austria
    Beans
    18
    Distro
    Ubuntu

    Re: Apache2 403 Forbidden

    my guess would be that the webserver has no rights to access those files.
    Can you list the file rights in your home directory?

    The files should be readable by group apache2.

  7. #7
    Join Date
    Aug 2011
    Beans
    4

    Re: Apache2 403 Forbidden

    yep it was the rights, apparently the whole HOME was set to my own, instead of root.

    I changed this and it worked straight away.

    Happily going on fixing my www now.

    Thank you for your help and thinking with me.

Tags for this Thread

Bookmarks

Posting Permissions

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