Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
hi, I just installed Fedora core 1 and the apache installs that comes with it. The server is up and running. I can see the default welcome page. I need ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416

    Apache user directories not working


    hi,

    I just installed Fedora core 1 and the apache installs that comes with it.
    The server is up and running. I can see the default welcome page.
    I need to enable user directories but it does not seem to work.

    I keep on getting a 403 forbidden error.
    I have created a public_html directory, specified Userdir enabled and the permissions on the folder are 755.

    I tried this with Fedora core 3 as well but same problem.
    Specifying a <directory "/home/*/public_html"> directive does not seem to make a difference

    any ideas?
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    can you post your httpd.conf
    an except your 755 permission did you set anything else?
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  3. #3
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    Here are the sections that are relevant

    <IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory

    # permissions).
    #
    UserDir enabled myusercode
    UserDir disabled root

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, remove the "UserDir disable" line above, and uncomment
    # the following line instead:
    #
    UserDir public_html

    </IfModule>

    #
    # Control access to UserDir directories. The following is an example
    # for a site where these directories are restricted to read-only.
    #
    <Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>

    The public_html has 755 permissions. This is the error I get

    Forbidden

    You don't have permission to access /~myusername/ on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Do you have an index file? And files should be 644 unless there cgi scripts or directorys.

  6. #5
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    Sure do. And my index file is 644
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  7. #6
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    The Unforgiven
    Registered Linux User #358564

  8. #7
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    My httpd.conf file looks correct if you ask me.
    I had a look at those links and can't see anything I have done differently.
    Worked fine on FreeBSD, just cannot get it to go on fedora
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  9. #8
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    Did you check out your error_log?
    It must've given the reason why a 403 Forbidden error was encounterd.

    Also, instead of trying out all the options at one go, why don't you start with the most basic setup and try if it works fine?
    Then you can keep on adding options - like making it stricter and stricter.
    The Unforgiven
    Registered Linux User #358564

  10. #9
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    yes, it says permission denied. The default httpd.conf file doesn't need more than uncommetting the appropriate sections right?
    I did not do anything else other than uncommenting it.

    cheers
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  11. #10
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    Quote Originally Posted by Allblack
    yes, it says permission denied. The default httpd.conf file doesn't need more than uncommetting the appropriate sections right?
    I did not do anything else other than uncommenting it.

    cheers
    Hmm..
    And your dir permissions are 755, right?

    Ok, then it could be problem of your Order allow,deny.
    Try setting it as
    <Limit GET POST OPTIONS>
    Order deny,allow
    Allow from all
    </Limit>

    instead of
    <Limit GET POST OPTIONS>
    Order allow,deny
    Allow from all
    </Limit>
    This is just to get it working for everybody.
    Later on you can make it stricter by specifying rules about hosts that should be allowed to access the site.

    Remember, the second value overrides the first value in the Order directive.
    The Unforgiven
    Registered Linux User #358564

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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