SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Location
    St. Louis, MO
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess: Apache 2 vs Apache 1.x

    Hello.

    I've recently moved from Mac OS X with Apache 1.x to a RedHat Linux 8.0 machine running Apache 2. Relatively smooth transition, except my password protected directories aren't working.

    The files involved all exist with proper usernames in the htpasswd file, but I just keep getting 401 errors when I login. In my httpd.conf file, I have a <VirtualHost> with a <Directory "/"> directive inside it. That <Directory> directive only has AllowOverride AuthConfig in it.

    Here's my .htaccess file:

    Code:
    AuthType basic
    AuthUserFile /var/www/documents/mlester/htpasswd
    AuthName "Password Protected"
    require valid-user
    Is there a difference in the cofiguration between Apache 1.x and 2 that would cause this to be a problem?

    Thanks in advance!

    -GodOfHonk

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Having not used v2 I can't comment on the syntax, but one thing to do is re0create the users and passwords, as MacOS and RH may use different encryption on the password, RH will most likely use MD5 hash and MacOS could still be using the standard unix crypt() function (Not sure if it does or not).
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  3. #3
    SitePoint Member
    Join Date
    Aug 2002
    Location
    St. Louis, MO
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the advice. I didn't think of that. Unfortunately, I did recreate all the password and .htaccess files by hand.

    Any other ideas?

    Thanks again!

    -GodOfHonk

  4. #4
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure that the path to your password file is correct.

    Also, make sure that the permissions allow Apache to read that file.
    ----Adopt-a-Sig----
    Your message here!

  5. #5
    SitePoint Member
    Join Date
    Aug 2002
    Location
    St. Louis, MO
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bingo.

    Got it.

    It was the permissions. It's the little things that just kill you.

    Thanks a bunch!

    -GodOfHonk


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
  •