SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    CA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy .htaccess on Apache/Win XP (help!)

    Hello

    I have Apache 2.0 for Win32 installed on my XP box along with ActiveState's Perl , Sendmail, etc and it all works great. I could'nt be happier!. However, I have tried to get .htaccess working until I am blue in the face and while this is *supposed* to be a simple thing, it has proven to be very problematic for me. What am I doing wrong here please?.

    Ok, here's the scoop...

    I have my .htpasswd file installed in:

    "C:Program Files\Apache Group\Apache2\".

    The .htpasswd file contains exactly the following:

    shoefly:greenman

    I have my .htaccess file installed in the folder I want to password protect. That folder is here:

    "C:Program Files\Apache Group\Apache2\htdocs\private".

    The .htaccess file contains exactly the following (but I've tried a number of variations):

    AuthUserFile /Apache2/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Sound Effects Library"
    AuthType Basic

    <Limit GET POST>
    require valid-user
    </Limit>

    The only other thing I've done is to change the "AllowOverride" directive in the Apache /conf/httpd file from "None" to "All" (I've also tried others).

    My problem is that while the login screen comes up with no problem when I attempt to enter the protected folder, it will not accept the username/password I used in the .htpasswd file. I've tried it encrypted and plain text.

    Finally, is that little utility in Apache's bin folder (htpasswd.exe) really necessary in order to create password-protected folders and use .htaccess or can I just do this manually with a few simple text files in NotePad.

    Well, Hope I've explained this ok. Thank's in advance for any help on this perplexing issue (I'm getting desparate now!)

  2. #2
    Idler. Chazzy's Avatar
    Join Date
    Jan 2004
    Location
    Uk
    Posts
    336
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My problem is that while the login screen comes up with no problem when I attempt to enter the protected folder, it will not accept the username/password I used in the .htpasswd file. I've tried it encrypted and plain text.
    Hi, Im unsure of how much fun windows must be with .htaccess files but I know that under unix you are required to encrypt the password you put into htpasswd using the binary htpasswd from the shell prompt.

    Try this info.

    $ htpasswd -n test
    New password:
    Re-type new password:
    test:ItvaeGGSUrPfw
    $

    test:ItvaeGGSUrPfw

    the login is test, and the password is test

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I believe it uses base64 encryption but I'm not sure. Could be worth a shot.

  4. #4
    Idler. Chazzy's Avatar
    Join Date
    Jan 2004
    Location
    Uk
    Posts
    336
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not sure as I would sooner throw stones in glasshouses than have a windows server

  5. #5
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all there is a mistake:

    > AuthUserFile /Apache2/.htpasswd
    that directive means that the .htpasswd file is located at
    c:/Apache2/.htpasswd

    So you will want to use
    AuthUserFile .htpasswd

    and the fullpath will be:
    "C:\Program Files\Apache Group\Apache2\.htpasswd"

    then the first time use:
    C:\Program Files\Apache Group\Apache2> bin\htpasswd.exe -c .htpasswd pippo

    for other users then use:
    C:\Program Files\Apache Group\Apache2> bin\htpasswd.exe .htpasswd pluto



    p.s.
    htpasswd.exe should be under the bin dir if i remember right...
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


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
  •