Visitors

HOW TO: Change default port and configure redirection in Apache Tomcat.

By default, Apache Tomcat web server is configured to listen on port 8080. In order to get it to listen on the default http port 80 you have to reinstall it or follow these instructions:

  1. Navigate to C:Program FilesApache Software FoundationTomcat 6.0conf and edit server.xml:
    Change Connector port from 8080 to 80 (or any other port )

    <Connector port="80" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />
  2. Restart Tomcat service.

Again, default website is Tomcat home page. If you want to redirect all requests to a specific web app, you need to:

  1. Make a copy of index.html and/or rename it to index-tomcathome.html in C:Program FilesApache Software FoundationTomcat 6.0webappsROOT;
  2. Create a new index.html file with the following content:
    <html>
    <head>
    <META http-equiv="refresh" content="0;URL=http://<WebserverName_or_IPaddress>/<webapp_WARName>">
    </head>
    </html>

    For example, for IBM Cognos Incentive Compensation Management (ICM) WEB Client change URL to http://<WebserverName_or_IPaddress>/ICM

Should you need to access Tomcat management home page, you can do so via http://<WebserverName_or_IPaddress>/index-tomcathome.html

Hope this will help.

2 comments to HOW TO: Change default port and configure redirection in Apache Tomcat.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>