Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat and apache run

 
michael yue
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a tomcat server running on a linux server. If I install apache and successfully run it and then enter localhost or the url of the server, which page will i get. The tomcat server intro page or apache server intro page? Or will the 2 server clash and nothing happen.
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been a while, so correct me if I am mistaken. If you type in the url "localhost" or ip address of the localhost, you should get the apache test page. By default tomcat listens to port 8080. So if you append the url or IP address with port 8080 for example:


You should get the tomcat test page.
 
jay wick
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lin:

All depends on what you have set up.

If you want static content (html) to be servered from the / context by the web process on port 80 then do not configure Tomcat to do so.

There is no port conflict in the "default" set-up, the server.xml (which is the control mechanism for which ports Tomcat will listen on) has a JK connector on 8009 and an HTTP1.1 listener on 8080. You may change those, but if you attempt to change them to 80 apache will not start -- you get "port in use" errors.

You must start Tomcat first. Using Tomcat to serve all content is possible...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic