I'm configuring tomcat to forward visitors to a different domain and different port using the tomcat http connector, and proxy settings in the apache site config (as explained here).

A more specific explanation: - I'm running a web app 'yasgui' on domain1.org:8080/yasgui - I'm forwarding it using a http connector to domain2.org/yasgui by configuring the connector like this:

 <Connector port="8080" protocol="HTTP/1.1"
           proxyName = "domain2.org"
           maxPostSize = "0"
           proxyPort = "80" 

and adding this to the site config of domain2.org:

ProxyVia On
ProxyPass /yasgui http://domain2.org:8080/yasgui

This works perfectly fine when I visit http://domain1.org:8080/yasgui , which gets forwarded to http://domain2.org/yasgui. However, this link does not work: http://domain1.org:8080/yasgui/ (notice the trailing slash). This link shows the page as-is on domain1.

I'm not sure where the error is here: the apache config or the tomcat config. Help is much appreciated!


Please fix your Apache configuration. Please add

ProxyPassReverse  /app http://localhost:8080/app 
  • Added this to my apache config to no avail. The trailing slash problem persists.. ps. is the 8081 port a typo? (tried config with both 8080 and 8081 ports) – Laurens Rietveld Apr 6 '13 at 11:59
  • yes, it was typo. Any case the configuration should be fixed. Also, probably app is "yasgui". Correct? Can you open the URL directly? domain2.org:8080/yasgui – Michael Apr 6 '13 at 15:45
  • Yes, opening both domain2.org:8080/yasgui and domain2.org/yasgui/ works fine.. (ps. changed app name (yasgui) properly in starting post) – Laurens Rietveld Apr 8 '13 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.