0

I have a Ubuntu running an Apache 2.2 webserver, and I'd like to password protect a directory that I'm serving, with all of its files and subdirectories, and be given a security prompt

Here's what I have in the virtual server web directory I'd like to protect:

AuthName "Dialog prompt"
AuthType Basic
AuthUserFile /home/dev/.htpasswd
Require valid-user

I also have a valid .htpasswd file in /home/dev. After researching a bit on serverfault, I learned that it may be necessary to give file and directory ownership to the owner of the apache process, which I did.

But at every time I try this, the website in this directory has loaded.

1 Answer 1

0

Without showing us your complete apache configuration, it will be difficult to determine exactly the cause of your problem.

Anyway, I think you need to look at AllowOverride directive. You need to allow at least AuthConfig. You can for simplicity allow ALL. Don't forget to reload/restart your apache server after the changes.

1
  • Correct, to use .htaccess I would have had to use the AllowOverride directive from within http.conf. Thanks, this helped me get to the answer
    – jarede
    May 22, 2012 at 17:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .