Apache / Tomcat port information
Ok, I'll try answering you.
Consider Apache HTTPD and Apache Tomcat two friends (I'll call them in short HTTPD and Tomcat). Each of them has means of comunicating with other people, let's say by mobile phone and lineland phone or IM.
Tomcat has three phones for recieving calls:
One for recieving international calls in which he speaks the langauage spoken by most people in the (informatic) world, HTTP. This phone has an international agreed subnumber (port) which is 80, but can be any number. It happens that Tomcat being a bit eccentric preferes 8080 by default, so you can speak him HTTP at port 8080 by default.
Another phone for recieving calls from international VIP people, which want to be ultra sure they are speaking with Tomcat and nobody can listen their call, so they speak the previous international language but switching words (encryption, HTTPS). By international agreements this port is 443, but as we said Tomcat is eccentric, he chooses for this port 8443.
The third Tomcat's phone he uses it to recieve calls only from people that speak his own language, AJP (He lives in Java Application Server Country). By International Common Law, it's port 8009.
HTTPD has only two phones for recieving calls
- The first two are the same as for Tomcat but HTTPD is not that eccentric prefering to use the normal agreed numbers, 80 for HTTP and 443 for HTTPS.
The story
Now HTTPD has a shop. Sometimes costumers ask for stuff not present in the shop but when he knows Tomcat has it he calls Tomcat and asks him to bring the things.For speaking with Tomcat HTTPD can use international languages, HTTP and HTTPS, but often Tomcat is more happy to speak his own language, AJP. So HTTPD knows that there are two translators that can help him speak AJP with Tomcat, mod_jk (http://tomcat.apache.org/connectors-doc/) and mod_proxy_ajp (https://httpd.apache.org/docs/2.4/mod/mod_proxy_ajp.html).
Now being more serious, by default, HTTPD listens on ports 80 for HTTP and port 443 for HTTPS.
Tomcat listens on port 8080 for HTTP, port 8443 for https and port 8009 for AJP.
You can configure the ports for HTTPS using Listen directives in it's configuration file, httpd.conf or files included from it. So grep for Listen to check them.
You can configure Tomcat for the ports in server.xml. In Tomcat language those are connectors (as opposed to Listen in HTTPD). And as for your configuration, if you setup Tomcat to use HTTPS he will redirect requests in HTTP to the port configured.
Keep in mind, HTTPD keeps care of his ports, Tomcat of his own ports and a port can be in listen only from a single application at a time. So if you have both HTTPD and Tomcat in the same machine, they fit nicely, as the ports used are different by default:
HTTPD: Ports 80 and 443
Tomcat: Ports 8080 8443 and 8009.
1) Apache HTTPD server and the Tomcat web server can be connected using The Apache Tomcat Connector - mod_jk
When you will configure mod_jk on Apache HTTPD server using the following link you will see the connection: http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html The default port is 8009, but it can be changed on both sides: in server.xml on the Tomcat side and in the file worker.properties on the Apache HTTPD server side (look for 8009): http://tomcat.apache.org/connectors-doc/reference/workers.html
The configuration of Tomcat web server should be performed in addition to the workers configuration. If you will not configure the AJP Connector at Tomcat the AJP connection will not work: http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html
2) The Apache Tomcat Connector - mod_jk is started by Apache HTTPD server.
3) The redirectPort is not relevant to AJP. See below: http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
If this Connector is supporting non-SSL requests, and a request is received for which a matching requires SSL transport, Catalina will automatically redirect the request to the port number specified here.