Apache and Tomcat Configs

  1. Add your subdomain to the DNS server
  2. integrate *mod_proxy* into httpf.conf :
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
  1. define two virtual hosts as following

    NameVirtualHost *:80

    <VirtualHost *:80>
        ServerName application.domain.com
        ProxyRequests Off
        ProxyPreserveHost On
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        ProxyPass / http://www.domain.com:8080/application/
        ProxyPassReverse / http://www.domain.com:8080/application/
    </VirtualHost>
    
    <VirtualHost *:80>
        DocumentRoot C:\<pathToApache>\www
        ServerName www.domain.com
    </VirtualHost>
    

This will direct your site (www.domain.com) to your Apache HTTP server, and redirect all calls to Application to the Tomcat.