I have apache 2.2 mod_proxy working well for the most part, but are having some trouble with some of our newer tools.
We have the config file for one server below.
Our problem is, when a user goes to web.example.com/app1/prd/test.php the end application only sees a few things.. the current URL request it sees is webprd.example.local:8194/test.php and the header: X-Forwarded-Host:web.example.com
How can I write a header into the request, that would include the full URL/URI that the original requester had? The application needs that info for our usage. Something like
X-Forwarded-URI:web.example.com/app1/prd/test.php
Or we could even skip the host, since that is another header.
<VirtualHost xxx.xxx.xxx.xxx:443>
#removed some ssl and log related settings.
ProxyPreserveHost On
ProxyBadHeader Ignore
ServerName web.example.com
#app1
ProxyPass /app1/dev/ https://webdev.example.local:4433/ timeout=600
ProxyPassReverse /app1/dev/ https://webdev.example.local:4433/
ProxyPass /app1/test/ http://webtest.example.local:8194/ timeout=600
ProxyPassReverse /app1/test/ http://webtest.example.local:8194/
ProxyPass /app1/prd/ http://webprd.example.local:8194/ timeout=600
ProxyPassReverse /app1/prd/ http://webprd.example.local:8194/
ProxyPass /app1/ http://webprd.example.local:8194/ timeout=600
ProxyPassReverse /app1/ http://webprd.example.local:8194/
#app2
ProxyPass /app2/dev/ http://webdev.example.local:16222/
ProxyPassReverse /app2/dev/ http://webdev.example.local:16222/
ProxyPass /app2/test/ http://webtest.example.local:16222/
ProxyPassReverse /app2/test/ http://webtest.example.local:16222/
</VirtualHost>