apache adress based access control
- by stijn
I have an apache instance serving different locations, eg
https://host.com/jira
https://host.com/svn
https://host.com/websvn
https://host.com/phpmyadmin
Each of these has access control rules based on ip adres/hostname. Some of them use the same configuration though, so I have to repeat the same rules each time:
Order Deny,Allow
Deny from All
Allow from 10.35 myhome.com mycollegueshome.com
Is there a way to make these reusable so that I don't have to change each instance everytime something changes? Ie, can I write this once, then use it for a couple of locations? Using SetEnvIf maybe? It would be nice if I could do something like this pseudo-config:
<myaccessrule>
Order Deny,Allow
Deny from All
Allow from 10.35 myhome.com mycollegueshome.com
</myaccessrule>
<Proxy /jira*>
AccessRule = myaccessrule
</Proxy>
<Location /svn>
AccessRule = myaccessrule
</Location>
<Directory /websvn>
AccessRule = myaccessrule
</Directory>