1 |
> > Run two vhosts that deliver the same content from the same DocumentRoot |
2 |
> > |
3 |
> > One has jack and jill as users in htpasswd with no acls in place |
4 |
> > The other has john and jacob as users in a different htpasswd with IP |
5 |
> > acls in place |
6 |
> > |
7 |
> > Trying to specify access rules to a group of users and not to other |
8 |
> > users all in the same context is a problem that will drive you nuts in a |
9 |
> > day. Rather side-step it entirely by applying your rules globaly to two |
10 |
> > different things. |
11 |
> > |
12 |
> |
13 |
> You can probably accomplish the same with path aliases and <Location> |
14 |
> restrictions. Untested: |
15 |
> |
16 |
> Alias /jackjill /var/www/your-stuff |
17 |
> Alias /johnjacob /var/www/your-stuff |
18 |
> |
19 |
> <Location /jackjill> |
20 |
> AuthType Basic |
21 |
> AuthName "Restricted" |
22 |
> AuthUserFile /var/www/jackjill.passwd |
23 |
> Require valid-user |
24 |
> Allow from <jack-ip> |
25 |
> Allow from <jill-ip> |
26 |
> Deny from all |
27 |
> </Location> |
28 |
> |
29 |
> <Location /johnjacob> |
30 |
> AuthType Basic |
31 |
> AuthName "Restricted" |
32 |
> AuthUserFile /var/www/johnjacob.passwd |
33 |
> Require valid-user |
34 |
> </Location> |
35 |
|
36 |
I like this idea since it means I don't need to mess with another domain |
37 |
name. The only problem I'm running into is one of the applications on the |
38 |
server doesn't work with www.example.com/jackjill/app, it only works with |
39 |
www.example.com/app. I set up a RewriteRule to rewrite /jackjill/app to |
40 |
/app, and that makes the application work, but then <Location /jackjill> |
41 |
doesn't work. Is there any way around this? |
42 |
|
43 |
- Grant |