Configuring Tomcat to use a Proxy server
This document (3725347) is provided subject to the disclaimer at the end of this document.
Environment
Novell NetWare 6.5
Novell Open Enterprise Server (OES)
Novell Portal Services 1.5
Novell exteNd Director 4.1 Standard Edition
Tomcat 3.3
Tomcat 4.1.18
Tomcat 5.0
Novell iManager
Situation
Resolution
Example:
java -envCWD=$TOMCAT_HOME -classpath $TOMCAT_CLASSPATH -Dhttp.proxyHost=192.168.1.1 -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=
If you want to use a TOMCAT_OPTS environment variable, you can also add $TOMCAT_OPTS in the above line anywhere before the org.apache.tomcat.startup.Main. A memory flag can also be used within this CONF file. In the above example -XMS254M -XMX300M is an example of a memory flag
** For TOMCAT 4.1 **
To enable TOMCAT 4.1 on a NetWare server to use proxy, you must
first modify the edit sys:\tomcat\4\bin\TOMCAT4.ncf file with the
necessary parameters. The definitions should be added to the
CATALINA_OPTS variable, not on the LOAD JAVA line. The line setting
the CATALINA_OPTS variable should become something like this:
Where:
For Linux OES, the following changes must be made:
1. In the file /opt/novell/tomcat4/bin/dtomcat4 find the line that sets the environmental variable CATALINA_OPTS.
2. Add the following three lines:
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyHost=proxyhost"
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyPort=proxyport"
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.nonProxyHosts=ip subnet"
3. Restart TOMCAT4 - /etc/init.d/novell-tomcat4 restart - after making the edits.
For Linux OES2, the following changes must be made:
1. In the file /etc/sysconfig/j2ee find the line that sets the environmental variable CATALINA_OPTS.
2. Add the following three lines:
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyHost=proxyhost"
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyPort=proxyport"
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.nonProxyHosts=ip subnet"
3. Restart TOMCAT5 - /etc/init.d/novell-tomcat5 restart - after making the edits.
Additional Information
Formerly known as TID# 10067182
To set a proxy username and a proxy password, similar to adding the -Dhttp.proxyHost=hostname parameter, two other parameters can be added. -Dhttp.proxyUser=username and -Dhttp.proxyPassword=supersecret can be added in a similar fashion to enable authentication for the proxy requests.
Document
| Document ID: | 3725347 |
| Creation Date: | 11-06-2007 |
| Modified Date: | 12-24-2008 |
| Novell Product: | Apache |
| Novell Product: | BorderManager |
| Novell Product: | exteNd |
| Novell Product: | iManager |
| Novell Product: | NetWare |
Disclaimer
The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.