I have apache running on a natting fw, that authenticates, reverse proxies, and provides an ssl wrapper for 2 webapps on the back end. This works with virtual hosting and proxies back based on the top level directory of the request, e.g. https://example.com/app1/ <-> http://app1/app1/
. (see fig1)
I would like to find a way to proxy back a request to a webservice based on an arbitrary header set in the request, e.g. if header web_service:coolwebservice is set, it proxies back to webservice:8000. Is this even possible?
fig1 [Apache:example.com:443 / FW / NAT] | ┌------------------┬------------------┐ | | | V V V [app1:80 /app1/] [app2:8080 /app2/] [web_service:8000]