Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each instance of Tomcat will need unique ports assigned to it. Out of the box, these ports are: ||

Port

...

Description

...

Notes

...

...

8005

...

Control port

...

Not used when launched via jsvc

...

...

8009

...

AJP connector

...

 

...

8080

...

HTTP connector

...

 

...

8443

...

HTTPS connector

...

Disabled by default

...

...

????

...

JMX connector

...

 

A text file or spreadsheet will need to be kept to keep track of ports. And depending on deployment type, not all ports will be necessary.

...

Daemon set-up (using jsvc)

Copy the attached [^daemondaemon.sh] to the bin directory.

Edit or create the file bin/setenv.sh with the following:

...

No Format
CATALINA_OPTS="-Dcom.sun.management.jmxremote \
    \    -Dcom.sun.management.jmxremote.port=8050 \
    \    -Dcom.sun.management.jmxremote.ssl=false \
    \
    -Dcom.sun.management.jmxremote.authenticate=false"

...

mod_jk deployment only uses the *control port* and *AJP connector port*.

Comment out the HTTP connector:

No Format
&nbsp;&nbsp;&nbsp;    <\!-\-
&nbsp;&nbsp;&nbsp;    <Connector port="8080" protocol="HTTP/1.1"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               connectionTimeout="20000"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               redirectPort="8443" />
&nbsp;&nbsp;&nbsp; \
    -->

Give Tomcat a unique AJP connector port and bind it to localhost:

No Format

&nbsp;&nbsp;&nbsp;
    <Connector address="127.0.0.1" port="8009" protocol="AJP/1.3" redirectPort="8443" />

...

Plain HTTP proxy deployment only uses the *control port* and *HTTP connector port*.

Comment out the AJP connector:

No Format

&nbsp;&nbsp;&nbsp;
    <\!-\-
&nbsp;&nbsp;&nbsp;
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
&nbsp;&nbsp;&nbsp; \
    -->

Give Tomcat a unique HTTP connector port and bind it to localhost:

No Format

&nbsp;&nbsp;&nbsp;
    <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;               connectionTimeout="20000"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               redirectPort="443" />

Configuring for jsvc

...

jsvc deployment only uses the *HTTP connector port* and *HTTPS connector port*, and these don't necessarily have to be unique. In fact, for best effect, they should be the standard ports 80 and 443. Note that the HTTPS connector port is optional if the application does not require SSL!

Comment out the AJP connector:

No Format
&nbsp;&nbsp;&nbsp;    <\!-\-
&nbsp;&nbsp;&nbsp;
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
&nbsp;&nbsp;&nbsp; \
    -->

Change the HTTP connector port to 80, bind it to the virtual host IP (xxx below):

No Format

&nbsp;&nbsp;&nbsp;
    <Connector address="xxx" port="80" protocol="HTTP/1.1"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               connectionTimeout="20000"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               redirectPort="443" />

Also be sure to change redirectPort to the actual HTTPS connector port.

If needed by the application, add the HTTPS connector, binding it to the virtual host IP (xxx below):

No Format

&nbsp;&nbsp;&nbsp;
    <Connector address="xxx" port="443" maxHttpHeaderSize="8192"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               maxThreads="150"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               acceptCount="100" scheme="https" secure="true"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               SSLEnabled="true"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               SSLCertificateFile="${catalina.base}/conf/zzz.crt"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;               SSLCertificateKeyFile="${catalina.base}/conf/yyy.key" />

...

(See the section "User Web Applications" under [http://tomcat.apache.org/tomcat-6.0-doc/config/host.html].)

The _Software Download_ channel requires that images and support documents be retrieved from ~sitesoft/public_html.
To configure Tomcat to do this, a Listener needs to be added to the server.xml file as a child of the <Host> tag: 

No Format
<Host name="localhost" ...>
 &nbsp; ...
 &nbsp; <Listener className="org.apache.catalina.startup.UserConfig"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            directoryName="public_html"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            userClass="org.apache.catalina.startup.PasswdUserDatabase"/>
&nbsp;  ...
</Host>