0

I am using tomcat on Linux centOs server. I want my java application is working fine on mydomain.com:8080. I want that my when some one hit the domain mydomain.com it automatically move to my java application.

Changin server.xml didm't worked for me. as i am also having apache2 on the server

Chetan Hallan
  • 279
  • 4
  • 15
  • Duplicate of http://stackoverflow.com/questions/4756039/how-to-change-the-port-of-tomcat-from-8080-to-80 – Sanchit Khera Dec 28 '16 at 07:51
  • http://stackoverflow.com/questions/23558810/how-to-change-port-8080-on-apache-tomcat-on-linux-centos-6-5-sever-to-the-defaul – Sanchit Khera Dec 28 '16 at 07:52
  • You can't have two servers listening on the same port. If you change the tomcat to listen on port 80, you have to change apache2 so that it listens on another port. – RealSkeptic Dec 28 '16 at 08:12

1 Answers1

0

I guess you have an apache server in port 80. I you do not want to remove apache and change directly the tomcat port ( see comments), you will need to redirect all traffic from port 80 to port 8080.

This can be done using tomcat connectors. They are plugins to connect web servers with Tomcat. When a HTTP request arrives, the plugin checks is it has to be redirected, connects to tomcat and returns the response to server

In the case of apache is needed to install mod_jk. In the link you can see the configuration

pedrofb
  • 37,271
  • 5
  • 94
  • 142