Consider: Apache 2.x is running on port 80, Tomcat 6.x.x is on port 8080
- Got to {Apche2 installation folder}\Apache2.2\conf , Open httpd.conf to edit
- Uncomment the following three lines,
- 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
- Add the following entry to the main section of httpd.conf file
#Enableing proxy for rediretion to tomcat
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
<Location / >
Order allow,deny
Allow from all
</Location>
- Test by typing http://localhost; tomcat default page will come up.