• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should Tomcat listen on port 80?

 
Hank Jordan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, all. I currently have Apache listening on port 80 and Tomcat on port 8080. Therefore, in order to access a JSP or servlet, the client must append :8080 to the web site address. This works well enough, but I would rather not have the port number in the URL. Is the correct way to handle this to shut down Apache and configure Tomcat to listen on port 80? Or is it possible to have Apache somehow forward requests for JSPs and servlets to Tomcat? In case it makes a difference, I am running Apache 1.3 and Tomcat 4.1 on Mac OS X 10.3.9. Thanks in advance!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only on server can bind to a given port at one time.
The standard way of doing this is to use to have Apache httpd pass requests to Tomcat via a connector.
Here is the page for connectors:
http://tomcat.apache.org/connectors-doc/
 
Stu Thompson
Hooplehead
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on what you need your http server to do, you could consider dumping apache httpd and using only tomcat. if your httpd is servering up only static content with no PHP or interesting http.conf tweaks, then this might be a serious option for you.
 
Hank Jordan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your responses. Now that I understand the options, I looked around on the web, and I see that there are many factors involved in the decision whether to use Apache httpd and Tomcat together, or Tomcat stand-alone. For now I will go with using the two together because it seems to offer the greatest flexibility, and it seems like it would be relatively straightforward to switch to Tomcat stand-alone if that seems appropriate down the road. Thanks again for your help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic