Eric Jain wrote:
I have a Tomcat (5.5.12) server that is hidden behind Apache. On the
Apache server, several virtual hosts are defined.
<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxxxxxxx.xxxxxxx.xx
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
Now I'd like to map some of these virtual hosts to virtual hosts on the
Tomcat server.
Unfortunately this doesn't quite work as Tomcat is unaware of the
original hostname that was requested (even though this information
remains present in a X-Forwarded-Host header value).
The solution turned out to be quite simple:
<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxxxxxxx.xxxxxxx.xx
ProxyPass / http://xxxxxxxx.xxxxxxx.xx:8080/
ProxyPassReverse / http://xxxxxxxx.xxxxxxx.xx:8080/
</VirtualHost>
i.e. forward requests to xxxxxxxx.xxxxxxx.xx:8080 rather than localhost:8080.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]