Forwarding apache requests (port 80) to Tomcat (port 8080)?

ProxyPass        / http://www.abc.com:8080/myApp/
ProxyPassReverse / http://www.abc.com:8080/myApp/

Read more about mod_proxy


A simpler method for doing this is to just add a Virtual Host entry in your Apache conf file. Usually located in /etc/httpd/conf, add something like this at the end of the Virtual Host section:

<VirtualHost X.X.X.X:80>
ServerName tomcatpage.yourdomain.com
ServerAlias tomcatpage.yourdomain.com
Redirect permanent / http://tomcatpage.yourdomain.com:8080/
</VirtualHost>

Restart your Apache service and you are done.


You can use mod_rewrite in Apache to do this. Load mod_rewrite in your Apache and in your www.xyz.com vhost add the following rule:

RewriteRule ^/(.*) http://www.abc.com:8080/myApp/$1

This should do the magic.

More info about mod_rewrite here.

EDIT: In order to keep the site name in the browsers, use mod_proxy as well by just appending a [P] at the end of the RewriteRule:

RewriteRule ^/(.*) http://www.abc.com:8080/myApp/$1 [P]

This will force Apache to act as a proxy for that URL instead of just rewriting the URL.