• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to get Tomcat to listen on port 80

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic