Meaningless Drivel is fun!*
The moose likes Tomcat and the fly likes How to get Tomcat to listen on port 80 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to get Tomcat to listen on port 80" Watch "How to get Tomcat to listen on port 80" New topic
Author

How to get Tomcat to listen on port 80

Nina Anderson
Ranch Hand

Joined: Jul 18, 2006
Posts: 148
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: May 14, 2008
Posts: 198
If you are just running Tomcat, you can change the port number in the Connector configuration in the server.xml file.


Author: JBoss in Action, javidjamae.com, @javidjamae on Twitter
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get Tomcat to listen on port 80
 
Similar Threads
Integrating Tomcat and Apache - URL Problem
site transfer context path problem
Eclipse - J2EE perspective - Tomcat question...
where to map the domain name in Tomcat?
WebSite Mapping