[svlug] FW: Apache: different authentication for a subdir of authenticated directory...
Daevid Vincent
DayWalker at TheMatrix.com
Wed Jun 21 18:04:57 PDT 2000
Here's another one for you Apache gurus.
(Is there a mailing list for Apache support? I didn't see any listed on
apache.org)
[Running Apache 1.3.12 (latest AFAIK) and Linux RH 6.2]
I have a directory called /private that I'm giving access to anyone within
our IP range, or via a pw if they're not -- that works great.
I want a subdir of that to authenticate based on the database
(mod_auth_mysql). It sorta works, but sorta doesn't.
If I connect from a remote box that IS NOT in our IP range and get the
user/pw prompt, then I get into /private, and if I try to get into
/private/TattooShop I get another prompt == perfect, however if I am within
the IP range, I can get into /private/TatooShop without the second prompt
for authentication?!
here are the two Direcory blocks and I've even tried switching their order
so TattooShop is lower in the list in case there was some strange bug or
whatever, but that made no difference:
It seems to me that when Apache encounters another sub- <Directory> block,
it should allow that to over-ride any previous <Directories> it was using.
<Directory /www/html/private/TattooShop>
Auth_MySQL_Encryption_Types Plaintext Crypt_DES MySQL
Auth_MySQL_DB tatooDB
Auth_MySQL_Password_Table User
Auth_MySQL_Username_Field user
Auth_MySQL_Password_Field password
Auth_MySQL_Group_Table User
Auth_MySQL_Group_Field group
AuthName "TatooShop"
AuthType Basic
require valid-user
IndexIgnore
</Directory>
<Directory /www/html/private>
AuthName "Private Area"
AuthType Basic
FancyIndexing on
IndexOptions ScanHTMLTitles
Options All
AuthUserFile /home/httpd/conf/auth/private
Auth_MYSQL off
require valid-user
deny from all
allow from a.b.c.160/26 a.b.c.172/30 a.b.c.180/32
satisfy any
order deny,allow
</Directory>
More information about the svlug
mailing list