On 11/29/2012 03:43 PM, Alan McKinnon wrote:
> 
> 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 tried to come up with a less stupid way; I don't think there is one.

Reply via email to