logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: HTTP/1.1" 401 401
Author
sfreeman



Joined: 03 Dec 2008
Posts: 2

PostPosted: Wed 03 Dec '08 0:32    Post subject: HTTP/1.1" 401 401 Reply with quote

hey there guys, I just setup my new apache server today (it's simple, just to view some html books I have from my phone, instead of having to keep them actually on the phone). unfortunately, i'm having a problem now...I wanted to secure it using a username/password, and I thought I followed the directions correctly (http://httpd.apache.org/docs/2.2/howto/auth.html), but I'm getting the above error in my access log when I try to log in when I'm using Digest mode instead of Basic. Here's the htpasswd line I entered:
htpasswd -c "C:\Program Files\Apache Software Foundation\Apache2.2\Password" steve
then I got the two prompts to enter my password, which I did. then in httpd.conf, I have the following:
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/Books">
AuthType Digest
AuthName "Books"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "C:\Program Files\Apache Software Foundation\Apache2.2\Password\passwords"
Require user steve
</Directory>
Now, like I said, "AuthName Basic" works, but I would prefer to use Digest. Any ideas? I've tried it in multiple browsers, and it behaves the same in all three (Firefox 3.x, Chrome, and the evil IE).
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 03 Dec '08 1:32    Post subject: Reply with quote

Well .. you are mixing the two of them in your config.

AuthBasicProvider is for AuthType Basic
AuthDigestProvider is for AuthType Digest

htpassword.exe is for creating Basic type password files.
htdigest.exe is for creating Digest type password files.


see:
http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html
http://httpd.apache.org/docs/2.2/programs/htdigest.html
Back to top
sfreeman



Joined: 03 Dec 2008
Posts: 2

PostPosted: Wed 03 Dec '08 18:21    Post subject: Reply with quote

Ok, I got it all working, thx for the help. Another issue (which took me at least 30 minutes to figure out), is that:
LoadModule auth_digest_module modules/mod_auth_digest.so
was commented out by default. after I removed the #, everything's working.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 03 Dec '08 20:12    Post subject: Reply with quote

yep .. most modules are "turned off" by default. Only the basic necessities are on by default.
Back to top


Reply to topic   Topic: HTTP/1.1" 401 401 View previous topic :: View next topic
Post new topic   Forum Index -> Apache