> > Run two vhosts that deliver the same content from the same DocumentRoot > > > > One has jack and jill as users in htpasswd with no acls in place > > The other has john and jacob as users in a different htpasswd with IP > > acls in place > > > > Trying to specify access rules to a group of users and not to other > > users all in the same context is a problem that will drive you nuts in a > > day. Rather side-step it entirely by applying your rules globaly to two > > different things. > > > > You can probably accomplish the same with path aliases and <Location> > restrictions. Untested: > > Alias /jackjill /var/www/your-stuff > Alias /johnjacob /var/www/your-stuff > > <Location /jackjill> > AuthType Basic > AuthName "Restricted" > AuthUserFile /var/www/jackjill.passwd > Require valid-user > Allow from <jack-ip> > Allow from <jill-ip> > Deny from all > </Location> > > <Location /johnjacob> > AuthType Basic > AuthName "Restricted" > AuthUserFile /var/www/johnjacob.passwd > Require valid-user > </Location>
I like this idea since it means I don't need to mess with another domain name. The only problem I'm running into is one of the applications on the server doesn't work with www.example.com/jackjill/app, it only works with www.example.com/app. I set up a RewriteRule to rewrite /jackjill/app to /app, and that makes the application work, but then <Location /jackjill> doesn't work. Is there any way around this? - Grant