Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have few questions regarding the Apache HTTPD server and the Tomcat web server port configurations.

Through netstat and TOMCAT/conf/server.xml I understand that:

  • 80 and 443 ports are used by Apache for HTTP and HTTPS requests respectively.
  • 8080 and 8443 ports are used by Tomcat for HTTP and HTTPS requests respectively.
  • There is one more Connector port="8009" using the "AJP/1.3" protocol. (AJP connector is used for cases where you wish to invisibly integrate Tomcat 4 into an existing (or new) Apache installation)

However:

  1. How is the 8009 port interrelated with the Apache and Tomcat ports? Does this mean how the requests are interchanged between the connector, Apache, Tomcat, etc.?

  2. What is starting this AJP connector (Tomcat or Apache)?

    Because even when Apache is started; I am NOT seeing a socket listening at 8009. But this is the port mentioned at apache2/conf/workers.properties.

    I think after Tomcat is started this port is available.

  3. In server.xml what is the purpose of redirectPort 8443?

<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
share|improve this question

migrated from stackoverflow.com Apr 1 '13 at 12:20

This question came from our site for professional and enthusiast programmers.

    
Did you see the answer below? Was it helpful? –  Michael Mar 31 '13 at 18:54

1 Answer 1

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.
share|improve this answer
    
Thanks for your try! But you haven't answers the question. All these links i already went? Could you please specific to my questions and elaborate more? –  Kanagavelu Sugumar Apr 1 '13 at 8:13
    
I have updated the answer - see if it answers your questions. –  Michael Apr 1 '13 at 16:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.