Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to password the directory /rutorrent on my website. In that directory, I've created this .htaccess file:

AuthUserFile /home/whitey/sites/localhost/.htpasswd
AuthName "Login to use rutorrent"
AuthType Basic

require valid-user

And then I have a .htpasswd file in /home/whitey/sites/localhost/:

whitey:f9kK77E4scRcI

I've generated the password using an online .htpasswd generator. I've restarted Apache, but when I go to the /rutorrent directory, I'm not prompted for a password.

Nothing shows up in the error logs, either.

share|improve this question

1 Answer 1

In order for Apache to use your .htaccess file, the base configuration must specify that you're allowed to override the configuration using the AllowOverride directive. Further, the appropriate type of override must be allowed. For Auth* and Require directives, you must have at the minimum (you can have other options in the list too, or All):

AllowOverride AuthConfig

set for the <Directory> the .htaccess file is in (or a directory above it, with no other directory disabling the directive)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.