.htpasswd and virtual hosts
ok I have been looking everywhere for an answer for this one, so sorry if there is one out there. I have a couple of virtual hosts with Apache and I want to protect one of the sites, but when I put the neccessary protection in it works great, my problem is that my main site also asks for the password, even though I have it 'override none' in the <Directory> and also the other virtual hosts dont ask for it, except for my main site, can anyone help? here is a copy of my http.conf file:
NameVirtualHost *:80
//this one prompts for a password, but I dont wanted to
<Directory /var/www/html>
Options Indexes Multiviews
AllowOverride none
Order Deny,Allow
Allow from all
</Directory>
<VirtualHost *:80>
ServerName XXXX.net
DocumentRoot /var/www/html
TransferLog logs/access_log
</VirtualHost>
<Directory /home/matrimonio>
Options Indexes Multiviews
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot /home/matrimonio
ServerName XXXXX.net
ErrorLog logs/host2-error_log
TransferLog logs/host2-access_log
</VirtualHost>
<Directory /fatty/Familia>
Options Indexes Multiviews
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot /fatty/Familia
ServerName XXXXXX.net
ErrorLog logs/host3-error_log
TransferLog logs/host3-access_log
</VirtualHost>
//this is the one that I want password protected
<Directory /home/windows>
AuthType Basic
AuthName "My Shit!!!!"
AuthUserFile /usr/local/apache2/conf/password
Require user friend
Options Indexes Multiviews
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot /home/windows
ServerName XXXXXX.net
ErrorLog logs/host1-error_log
Transferlog logs/host1-access_log
</VirtualHost>
|