httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] AllowOverride and authentication
Date Wed, 11 Aug 2004 15:16:03 GMT
On Wed, 11 Aug 2004 08:56:00 -0600, Steve Suhre <steve@antero.com> wrote:
> 
> Howdy!
> 
> I've got an area of one virtual domain that's password protected via
> ..htaccess files. I'd like to allow access to the same area from another
> virtual domain on the same server, without authentication. The conf file
> sets AllowOverride at ALL for the whole server within a <Directory>
> directive, then I added a second <Directory> directive, after the first,
> for the folder where the second virtual domain lives with AllowOverride at
> NONE, and I have a symbolic link to the folder from within the second
> domain's file structure. But I'm just getting the login prompt no matter
> where I try to access the folders. Is there another way to do this?
> 
> Apache 1.3.2

I hope that's not really your Apache version.

The best and clearest way to accomplish what you want is to get rid of
the .htaccess files and place the auth-related directives directly in
httpd.conf inside the <VirtualHost> section that needs the auth.  But
if you really want to use .htaccess, then you should scope your
AllowOverride inside the <VirtualHost> section so it only affects that
host, as in

<Virtualhost protected.example.com>
 <Directory /usr/local/httpd/htdocs>
 AllowOverride All
 </Directory>
</VirtualHost>

<Virtualhost unportoected.example.com>
 <Directory /usr/local/httpd/htdocs/>
 AllowOverride None
 </Directory>
</VirtualHost> 

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message