Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/:


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

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


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.