httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tosh Cooey <>
Subject [users@httpd] Creating authorized virtual directories
Date Wed, 09 Dec 2009 13:11:39 GMT
I don't know if "virtual directory" is the proper word but here's what I 
am trying to accomplish.

My web site has three directories: /images /css /js

The site will have multiple clients: client1, client2..clientN, with 
each client having their own users.

I want to give each client their own "directory":

Since N can be very high it makes no sense to have actual physical 
directories with DBI Authentication in each.

I had hoped to be able to use DirectoryMatch like this:

<DirectoryMatch "/www/htdocs/!(images|css|js)/(.+)$">
   AuthType MyAUTH

But that's not possible since /www/htdocs/client1..N doesn't actually 
exist and so 404 is thrown.

The options I have come up with are:

1) Create an Authentication handler right in the ROOT directory which 
gives requests to images|css|js a 200 and all other requests are passed 
to Authentication handlers.

2) A custom 404 handler but I'm unsure how it would handle the 
Authentication unless it was itself an Authentication handler.  Is this 
even possible?

3) A mod_rewrite monstrosity, but I'm also unsure how Authentication 
would be handled since Auth has to be performed on an existing resource.

Has anyone ever done something similar before?  What was the direction 
you chose?  Even the right terminology to google would be helpful...

Thank-you all!


McIntosh Cooey - Twelve Hundred Group LLC -

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message