Ubuntu – Running apache2 and tomcat6 on port 80

tomcatUbuntu

I have apache2 and tomcat6 installed on ubuntu 9.10. By default tomcat6 port no is 8080.

I want to run tomcat and apache on port 80. For tomcat virtual hosting it should navigate to tomcat webapps and for apache it should direct to var/www.

Plz any one give me step by step guide to achive this.
Thank you!

I made tomcat to run on port 80 with mod_jk module installation.

Is it possible to run tomcat on port 80 and as well as on 8080?. Because I'm using "Application Manager" monitoring tool and I have to monitor tomcat. It requires tomcat to be running on any port. As I did port forwarding(mod_kj), when I try to specify the tomcat port to get it monitored, I'm getting the error "Service is not running" on that port. I tried the ports 80,8080,8009… checking in the server.xml file.

Best Answer

Read more about mod_proxy_ajp or mod_jk. One of these modules will help you to have tomcat apps served by apache.
You cannot have two services on the same port, unless, you bind the services to different IPs.
Assuming you have two IPs you bind apache on first IP port 80 and tomcat on the second.

The easiest is using apache modules. Search for tomcat and apache configs that meet your needs.

HTH