I have Apache (2.2) server with below configuration for reverse proxy to application running on tomcat(6) on 8080 port.
....
ServerName ext-domain
ProxyPreserveHost On
ProxyPass /myapp http://int-domain:8080/myapp
ProxyPassReverse /myapp http://int-domain:8080/myapp
....
When I access below URL from browser
"http://ext-domain/myapp"
I get below URL replaced in browser address bar.
"http://ext-domain:8080/myapp"
And apache access log says…
"GET /myapp HTTP/1.1" 302 421 "-" "Mozilla/5.0"...
How to avoid this port 8080 insertion in response URL?
Can someone help on this? thanks.
Best Answer
Update ProxyPassReverse as below.
Refer: http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html#usage