Using .htaccess Digest authentication


#1

So I’ve used user/pass authentication in Basic mode with a few sites on DH for years and thought with a new site that I’d give Digest mode a try. Setting that up within the DH panel only lets me use Basic, so I set it up manually.

When I go to the protected directory, however, I get this message:

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mydomain.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."

Has anyone successfully got Digest authentication working? I found a features update from 2006 by DH staff saying it’d be implemented starting on that date, but I’ve had no luck.

Any ideas?

Thanks!


#2

Yes. I followed the documentation at Apache Module mod_auth_digest and it works on my machine.

The page you posted is a general message and somewhat pointless to post verbatim. Follow the instructions and check the server error log where details (if available) are recorded.

Customer since 2000 :cool: openvein.org | Please don’t feed the trolls. :@


#3

Thanks for the link. By “your machine”, do you mean your hosted DH account or your personal web server? I’m specifically having this issue with my DH hosting.

i’ve not seen this “” stuff before, and it doesn’t seem like it’d be valid in a normal .htaccess file, do you know more about that?


#4

Whichever one is more helpful :slight_smile:

Yes, I’ve read that part of the documentation :stuck_out_tongue:

Customer since 2000 :cool: openvein.org | Please don’t feed the trolls. :@


#5

So, i’ve been digging through my error logs and here’s what i’ve been getting… any ideas why?

[Sat Nov 28 21:35:18 2009] [alert] [client 12.34.56.78] /home/user/domain.org/.htaccess: Invalid command ‘AuthDigestFile’, perhaps misspelled or defined by a module not included in the server configuration

I’ve manually loaded mod_auth_digest using this and verified it loads:

SetEnv MOD_mod_auth_digest 1

still get that error. just submitted a trouble ticket to DH support but this one’s got me scratching my head.


#6

Just in case anyone stumbles across this in the future, here’s the solution!

http://blog.aragirn.net/2006/11/08/debian-sarge-and-apache2/

Bottom line - you can’t use AuthDigestFile with DH - the solution is to use AuthUserFile.

It still uses digest authentication, but for whatever odd reason AuthDigestFile doesn’t work.


#7

That is incorrect. You can’t use AuthDigestFile with Apache 2.2 and not all DreamHost customers have sites hosted on machines running Apache 2.2 (myself included).

Customer since 2000 :cool: openvein.org | Please don’t feed the trolls. :@


#8

Since DH no longer broadcasts the Apache version, I don’t know an easy way to tell which version one is running, but I’m guessing that all of the new servers are running 2.2. My second guess is that all users will ultimately end up on 2.2 as DH migrates everybody to the newer servers.

-Scott


#9

sdayman:

[quote]I’m guessing that all of the new servers are running 2.2. My second guess is that all users will ultimately end up on 2.2 as DH migrates everybody to the newer servers.

[/quote]

Correct on both points.


#10

THANK YOU! I am so glad you figured this out (with or without atropos7, whom I hope has learned how to phrase his posts in a less condescending and more helpful way since 2009!)

I had the exact same problem trying to use digest authentication on Dreamhost, and all I had to do was change AuthDigestFile to AuthUserFile.

Thanks again! :slight_smile: