Ericsson
 
 
Set up an HTTP proxy for Tomcat Web Server 
*

Monday, November 29, 2004
All content and software implementations are not Ericsson-supported products. Note that Ericsson does not represent nor hold responsibility for the content from this area.

This article explains how to set up a Tomcat server to access a service layer resource via a proxy

Often service layer resources for Mobile Internet are behind a proxy server (see diagram below). 

Proxy01

In order for a web application to access the service layer resource, a proxy server for the Tomcat server hosting the web application must be configured.

To do this, you only have to add a few lines to a properties file. Simply add to the %CATALINA_HOME%/conf/catalina.properties file the following lines:

  • http.proxyPort=PORT(the port number that your proxy server is listening to for connections); and       
  • http.proxyHost=PROXYADDRESS(the IP address or the DNS name of your proxy server).
    Replace PORT with the port number that your proxy server is listening for connections. Replace PROXYADDRESS with either the IP address or the DNS name of your proxy server.

After making the changes restart the Tomcat Server.

Note that %CATALINA_HOME% refers to the location where you installed Tomcat.
For example, assume the Tomcat server is installed in C:\Tomcat, the proxy PORT is 80 and the PROXYADDRESS is www-proxy.company.com
Append the following lines to the file C:\Tomcat\conf\catalina.properties:
http.proxyPort=80
http.proxyHost= www-proxy.company.com

Restart the Tomcat server.

By Avelino Benavides


Last published February 17, 2007