Sunday, October 4, 2009

Change default port (8080) in TOMCAT

To change the the default port (8080) in TOMCAT do the following:-

Open the file server.xml present in C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf

Look for

<Connector port="8080" protocol="HTTP/1.1"
redirectPort="8443" />

Change port="8080" to port="80"

<Connector port="80" protocol="HTTP/1.1"
redirectPort="8443" />

You can now access your application by http://localhost/MYAPPLICATION instead of http://localhost:8080/MYAPPLICATION

NB: http://localhost:80/MYAPPLICATION is equivalent to http://localhost/MYAPPLICATION since the default port for http is 80.

1 comment:

  1. Another method you can use is iptables. iptables let you forward traffic received on one port (80) to another port (8080). This method bypasses the Apache webserver completely (even if it is running on port 80). This is the simple to setup. But you will not be able to use Apache.

    vitamine a