How to change default server port 8080 to 80 in JBOSS?

So here is another day of troubleshooting. I am completely new to JBoss and wanted to change the default port of JBoss which was 8080. Here are some of the steps which I followed and got success.

To run JBoss on port 80, please change all instances of 8080 to 80 in the following files:

1. server.xml in \server\default\deploy\jbossweb.sar

<!-- A HTTP/1.1 Connector on port 8080 -->
      <Connector protocol="HTTP/1.1" port="80" address="${jboss.bind.address}"
               connectionTimeout="20000" redirectPort="8443" />

2. jboss-service.xml in \server\default\deploy\http-invoker.sar\META-INF
3. bindings-jboss-beans.xml in \server\default\conf\bindingservice.beans\META-INF

<property name="port">80</property>
...
<xsl:when test="(name() = 'port' and . = '80')">

Things to remember:

  1. Ensure that new port number is not already occupied by some other service.
  2. JBoss is very close to Tomcat and many of its properties works the same way.

Leave a Reply

Your email address will not be published. Required fields are marked *