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-protect a website using Apache. (Beginner alert.) From another question on serverfault, I've found these instructions, which are really helpful.

But I've immediately hit problems at Step 1 - adding AllowOverride AuthConfig. My httpd.conf file doesn't look anything like the example given, it's only got one line:

ExtendedStatus On

In the same directory, there's an apache2.conf file which has lots more content, but nothing that looks like a DocumentRoot entry.

Finally, my Apache setup is using a bunch of virtual hosts, and in the sites-available directory, there's a file for my site that looks like this:

<VirtualHost *:80>
    ServerName blah
    WSGIScriptAlias / /home/okfn/var/srvc/blah/pyenv/bin/
    WSGIPassAuthorization On
    ErrorLog /var/log/apache2/blah.error.log
    CustomLog /var/log/apache2/blah.custom.log combined

Given all of the above, where do I put AllowOverride AuthConfig?

share|improve this question

The AllowOverride Directive is only valid in <Directory> Context

So you would be using some configuration like this

<Directory /var/www/pages>
    AllowOverride AuthConfig 
share|improve this answer
Thanks, but where should I put that? In the virtual host file in sites-available? – Ap257 Nov 11 '10 at 15:52
Actually any configuration file loaded by apache would do. But if you want to find it again in 2 years it would be advisable to put it somewhere near the VirtualHost it is used in. – pacey Nov 11 '10 at 15:59

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.