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'm trying to add a .htaccess file to a directory, everything works, the path to .htpasswd is working fine.

My contents are:

AuthUserFile /root/passwords/apache2/.htpasswd
AuthGroupFile /dev/null
AuthName "VNstats"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

The directory /root/passwords/apache2 is chowned to www-data.

However it still refuses to show an authentication box.

I started troubleshooting, and found some tutorials to edit httpd.conf or apache2.conf and add AllowOverride All. But everytime I do that, I get an error when reloading Apache2 that AllowOverride All is not allowed there.

It is a clean apache2 install, do I need to enable some mods? Where can I add AllowOverride All? What am I overlooking?

EDIT: I added this to httpd.conf:

<Directory /var/www/>
AllowOverride All
</Directory>
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

just curious "The directory /root/passwords/apache2 is chowned to www-data." <= okay, but what is /root permissions ? 700 ?

share|improve this answer
    
yes indeed you are correct –  Lucas Kauffman Aug 18 '11 at 16:49
    
I moved the folder to /etc/apache2 and now it is working fine :p thanks for reminding me :) –  Lucas Kauffman Aug 18 '11 at 16:53
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.