How to restrict Apache Location directive to cetain sub-domain?
- by ohho
On our server www.example.com, we use the <Location> directive to proxy traffic to a back-end server:
<Location /app1>
ProxyPass http://192.168.1.20
</Location>
Then we added a sub-domain uat.example.com which points to the same IP address of www.example.com. We want to use it as a proxy for client to test an app being developed. Hopefully, the client can access via:
http:/uat.example.com/app2_uat
Now if we add a Location:
<Location /app2_uat>
ProxyPass http://192.168.1.30
</Location>
The client can access both:
http:/www.example.com/app2_uat
http:/uat.example.com/app2_uat
How can I restrict Location such that only:
http:/uat.example.com/app2_uat
is accessible? (i.e. http:/www.example.com/app2_uat should not be accessible.)