htaccess htpasswd no prompt

Neros picture Neros · May 1, 2011 · Viewed 11.2k times · Source

I'm trying to protect a folder using '.htaccess' and '.htpasswd'.

I used http://www.tools.dynamicdrive.com/password/ to generate the files.

Copied them to the corresponding folders.

When I attempted to access the protected folder, I got a login prompt.

Input incorrect login details, get sent to error page.

All good.

Now, without any changes, I revisit the page to try and login again to access the protected folder, and it just throws an error, there's no login box.

If I delete the .htaccess, I can get into the folder again without errors.

Upon replacing the .htacces, I get the error again, still no login box.

I have tried to regenerate a new set of files, user/pass combo, and slight modifications to .htaccess just to try get some form of response back.

I have checked for any bytemark, both files are clean UTF-8.

What's going on? Why am I not getting a prompt anymore?

On a side note, where should the log be? All I managed to find was some access logs with nothing useful in them.


Site location on server

/home/labvccom/

/home/labvccom/public_html/admin/.htaccess

AuthName "Restricted Area"
AuthType Basic
AuthUserFile /htpasswords/.htpasswd
AuthGroupFile /dev/null
require valid-user

/home/labvccom/htpasswords/.htpasswd [user: admin | pass: password]

admin:02yd6IWnPes66

This is the page that i get when it throws the error with NO login prompt

Internal Server Error

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

Please contact the server administrator, [email protected] 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 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_fcgid/2.3.5 Phusion_Passenger/2.2.15 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at labvc.com.au Port 80

Answer

Anders Lindahl picture Anders Lindahl · May 1, 2011

Your browser remembers the first login attempt and send the credentials in the Authorization header - that is why you do not get a new login prompt.

Try to clear the authorization cache.

The underlying problem is most likely as @openscript.ch suggests.