apache, .htaccess in diffrent dirs..
Hello all,
I got this problem with my apache running on my gentoo server...=( My document root is /var/www/localhost/htdocs and if I put in a .htaccess file that looks like this in /var/www/localhost/htdocs/test/ Code:
/var/www/localhost/htdocs Then I have a lot of vhosts ... For instance one that goes to /var/www/localhost/www.mydomain.com my vhosts.conf has a line that looks like this: DocumentRoot /var/www/localhost/www.mydomain.com I can browse that page without problem, yet when I put in the exactly same .htaccess file as abowe, i dont get to a responce that asks for username and password.. It seems to skip the .htaccess file Does anyone now what I have done wrong? Can anyone help me??=) Regardz, -- Rincewind |
If you're on the same browser session that has authenticated for one user (for the same dir) then the browser will send the auth info without prompting.
Try testing on a new browser session. |
I've already tried that...
Even tried it in a another browser... So thats not the case..=( |
Use the "AllowOverride AuthConfig" directive inside your vhost definition as you do in your DocumentRoot
|
Hmm thanks...
But I get the following message after doing a /etc/init.d/apache2 restart * Stopping apache2... Syntax error on line 93 of /usr/lib/apache2/conf/vhosts/vhosts.conf: AllowOverride not allowed here [ ok ] * Apache2 has detected a syntax error in your configuration files: Syntax error on line 93 of /usr/lib/apache2/conf/vhosts/vhosts.conf: AllowOverride not allowed here So..... How do I allow AllowOverride =).. |
You have to put it inside the <Directory ...> </Directory> in your vhost definition, like this:
Code:
<VirtualHost *> |
All times are GMT -5. The time now is 04:32 AM. |