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-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/blah.py
    WSGIPassAuthorization On
    ErrorLog /var/log/apache2/blah.error.log
    CustomLog /var/log/apache2/blah.custom.log combined
</VirtualHost>

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

share|improve this question
add comment

1 Answer

The AllowOverride Directive is only valid in <Directory> Context

So you would be using some configuration like this

<Directory /var/www/pages>
    AllowOverride AuthConfig 
</Directory>
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
add comment

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.