Results 1 to 5 of 5

Thread: 403 after new DocumentRoot

  1. #1
    Join Date
    Nov 2013
    Beans
    2

    403 after new DocumentRoot

    I am a somewhat new to ubutnu. I've looked for the answer before posting here, but found nothing helpfull.
    Sorry in advance if I missed something abvious.
    I installed ubuntu 13.10 server ( ip address 192.168.1.103 )
    When I went to 192.168.1.103 in the browser I got:
    --------------------------------------------
    It works!

    This is the default web page for this server.

    The web server software is running but no content has been added, yet.
    --------------------------------------------

    Then I modified 000-default.conf from
    DocumentRoot /var/www
    to
    DocumentRoot /home/me/www

    Now in the browser I am getting 403 :
    Forbidden

    You don't have permission to access / on this server.
    Apache/2.4.6 (Ubuntu) Server at 192.168.1.103 Port 80

    Why is moving doc root gives permission error?
    Last edited by george15; November 26th, 2013 at 11:37 PM.

  2. #2
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: 403 after new DocumentRoot

    I don't know a ton about apache, but the file that I thought should be edited is in /etc/apache2/sites-available/default. If that's indeed the file you changed, did you make sure to change both the 'DocumentRoot' line and the 'Directory' lines? As a quick test, I just did what you tried and it seemed to work OK.

    EDIT One more thing that I forgot to say, I think by default, the directory should be owned by 'www-data'. You might also try changing ownership of the directory.
    Last edited by drmrgd; November 26th, 2013 at 11:10 PM.

  3. #3
    Join Date
    Nov 2013
    Beans
    2

    Re: 403 after new DocumentRoot

    In ubuntu 13.10 default became 000-default.conf
    I do not see Directory lines in there.
    I did not think permissions mattered since the directory has world read permission.
    Either way adding www-data access did not change anything.

  4. #4
    Join Date
    Aug 2009
    Location
    Makati City, Philippines
    Beans
    598
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: 403 after new DocumentRoot

    The directory has world read permission - yes, but how about the upper folders?
    Be sure to have 755 on the folders and parent folder of the directory you want to use. Access 403 is permission issues.
    The Philippine Team
    The best Ubuntu derivative: Linux Mint
    Relax. Head to the Community Cafe.

  5. #5
    Join Date
    Nov 2008
    Location
    Los Angeles
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: 403 after new DocumentRoot

    Quote Originally Posted by george15 View Post
    In ubuntu 13.10 default became 000-default.conf
    I do not see Directory lines in there.
    I did not think permissions mattered since the directory has world read permission.
    Either way adding www-data access did not change anything.
    hope it has passthrough permissions

    btw, try this
    Code:
    su www-data
    bash
    cd /
    now, start navigating one level at a time, until you get permission denied error.
    Fix the permissions on that folder, and you should be fine

    Also, make sure you have an index file - directory listings are disabled by default and will result in an error as well.

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
  •