Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Tomcat to listen on port 80

 
Nina Anderson
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an Apache + Tomcat web server. My web application is using JSP/Java for the most part, but there are some pages that are also PHP. My PHP pages are currently powered on 80


Right now our web application has tomcat set to: http://mydomain.com:8080

In addition, We are deploying our web application .war file in: /var/lib/tomcat5/webapps/MyWebApp

The problem is, when we need to access our web site, we have to go to:
http://mydomain.com:8080/MyWebApp to see work welcome page.

1) How can we change this, so when the user types: www.mydomain.com, it points straight to our .../MyWebApp/index.jsp file?

2) We currently access our PHP files via www.mydomain.com/upload.php. It is listening on port 80

Please...Help
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache + Tomcat? Apache is a manfacturer name and Tomcat is a product name of Apache.

Do you mean Apache HTTP Server + Apache Tomcat Server?

If so, take a look for the mod_jk to route JSP/Servlet requests through Apache HTTP Server to Apache Tomcat Server: http://tomcat.apache.org/connectors-doc
 
Javid Jamae
Author
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are just running Tomcat, you can change the port number in the Connector configuration in the server.xml file.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He mentioned that he is already using PHP on port 80, so I assume that he already runs Apache HTTP Server on that for PHP purposes and that he want to add JSP/Servlet access to that. In this case, use the mod_jk.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic