This content has been marked as final. Show 3 replies
Huh? Just don't start the Apache httpd. Why is this even remotely a Java question?
Apache takes all requests at port 80 or 443 per default and handles them, static pages or otherwise. If it is a request that matches a specific pattern it will hand it off to Tomcat using its AJP 12/13 comms protocol and then return the page (Tomcat returns it to Apache AFAIK). Or you can configure Apache using specific patterns to redirect specific requests to port 8080, in which case it is then Tomcat that is directly receiving them, rather than getting through Apache.
You have a few things you can do, configure Apache to redirect everything coming into port 80 to port 8080 (and 443 to 8443 respectively) in which case everything over ports 80, 443, 8080, and 8443 are being directly handled by Tomcat (flexible, convenient, and relatively safe).
Or you can simply not start Apache and force people to enter 8080 or 8443 into the url (cumbersome, but relatively safe).
Or you can simply not start Apache and configure Tomcat to use port 80 and 443, in which case Tomcat must be running as root, and then nothing will answer on 8080 or 8443 (although you could reconfigure Apache to use those ports). (convenient, but not safe).
I myself, would use the first of those three options (if Tomcat absolutely has to directly handle the requests). But, to be truthful, I would restrict Tomcat to only the admin and AJP 12/13 configured ports and let Apache handle requests communicating with Tomcat through mod_jk and its AJP 12/13 protocols. (safest, convenient, and flexible)
thanks masijade !!