tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Running Tomcat as a Service on Non-default port
Date Tue, 09 Sep 2008 13:41:39 GMT
Kamal Sheikh wrote:
> Hi,
> 
> I am using Tomcat v 5.5.23 and want to run the server as a Windows service
> (tomcat5.exe) on a port other than the default port of 8080.  Is it possible
> to install Tomcat as a service and configure it so that it runs on a
> different port?
> 
> While we can configure Tomcat and run it on a different port when we are in
> console mode (startup.bat or catalina run), but as a service it doesn't seem
> possible to change the default port.
> 
> Any help will be appreciated.
> 
> Thanks.
> 
That's a really easy one, even I can answer :

In your Tomcat installation directory, look for the subdirectory "conf", 
and in it the file "server.xml".

Locate this bit :

     <Connector port="8180" maxHttpHeaderSize="8192"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true" />

and change it to :

     <Connector port="9180" maxHttpHeaderSize="8192"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true" />

(i.e. the port= attribute, whatever it is and whatever you want).
Then start (or restart) the Tomcat service.

André

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message