2

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.

1 Answer 1

2

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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