Running JBoss AS 7 on Port 80

Finally, we are ready to take site live. Before, it was running as a static site out of Amazon S3. Now, it will run as a web app from JBoss AS 7.1.1. Basic steps to get this done are as follows:

  1. Create an elastic IP in Amazon AWS Console.
  2. Assign the elastic IP to the EC2 instance where JBoss is running.
  3. Stop Apache and disable the service so it doesn’t start automatically. This will avoid conflict over port 80.
  4. Make JBoss listen on port 80.

In this article, I will document step #3 and #4.

Disable Apache

Go to /etc/init.d. Run this to shutdown Apache.

./apache2 stop

Disable Apache service using this command:

chkconfig apache2 off

Verify that Apache is disabled by running:

chkconfig --list apache2

The service should be turned off for all run levels and the command should show:

apache2                   0:off  1:off  2:off  3:off  4:off  5:off  6:off

Make WebLogic Listen on Port 80

First, shutdown JBoss, if it is running:

./ --connect command=:shutdown

Open <JBOSS>/standalone/configuration/standalone.xml. Locate the line:

<socket-binding name="http" interface="external" port="8080"/>

Change it to:

<socket-binding name="http" interface="external" port="80"/>

Save changes.

Start JBoss. Test the site by accessing it over port 80.

Reboot the instance to verify that Apache is disabled and there is no port conflict.

One thought on “Running JBoss AS 7 on Port 80

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s