views:

11

answers:

1

Hi all:

I've been working with a simple authentication process on localhost, here is the .htaccess file:

AuthType Basic
AuthName "Admin login page"
AuthUserFile /Application/XAMPP/htdocs/.htpasswd
AuthGroupFile /dev/null
Require User [email protected]

I have created the related .htpasswd file, the browser can prompt for me to enter the username and password.

However, when I tried to access the protected index.html, after entering the credentials, Firefox only got me a http 500 error.

Tried to use Firebug and curl to inspect the response, only to see the 500 status code, nothing else could give me a clearer idea of what went wrong.

Also check the access.log under XAMPP's Apache logs folder, still just got 500 errors without detailed feedback.

Any thoughts? What would you use to debug in such a case?

Many thanks in advance!

Edited:

Tried to add another new user to the .htpasswd file, but still cannot get rid of the http 500 error.

+1  A: 

The access.log file will only show you info about the requests, not errors. Look for error.log or error_log (or something similar) in the same folder.

If it's not in the same folder, check your virtual host definition and httpd.conf files to see where the error log is stored.

bradym
@bradym: you are right! errr... I forgot to check the error.log :(
Michael Mao