JBoss Community Archive (Read Only)

JBoss Cloud Access

Launching a standalone JBoss Enterprise Web Server instance

In this example a sample web application is deployed on Apache Tomcat 6 server. Apache HTTPD server is used as a reverse proxy server.


  • Amazon EC2 cloud subscription

  • A pre-configured Security Group which allows incoming requests at least on ports 22 and 80.

Launch JBoss Enterprise Web Server

  1. In the 'Navigation' pane, click on "Launch Instance";

  2. Find and select a Jboss Enterprise Web Server AMI according to Configure and launch AMI;

  3. Click in the "User Data:" field and enter the following lines:

    # deploy the hello.war sample application to the Apache Tomcat 6 server which is part of the JBoss Enterprise Web Server offering
    cp /usr/share/java/jboss-ec2-ews-samples/hello-1.0.war /usr/share/tomcat6/webapps/hello.war
    # Configure HTTPd to act as a proxy to the Apache Tomcat 6 server
    cat >> /etc/httpd/conf.d/proxy_ajp.conf <<"EOF"
    <Location /hello>
    ProxyPass         http://localhost:8080/hello
    ProxyPassReverse  http://localhost:8080/hello
    ProxyPreserveHost On
    # Start the Apache Tomcat 6 server
    service tomcat6 start
    # Instruct SELinux to allow HTTPd to serve as a proxy relay
    setsebool -P httpd_can_network_relay 1
    # Start the HTTPd server
    service httpd start
  4. continue with the instructions from Configure and launch AMI;

  5. Wait until the instance's status is shown as "running";

Test JBoss Enterprise Web Server

  1. In the instance's details pane, note the instance's "Public DNS";

  2. In a browser, navigate to http://<public-DNS>/hello

  3. Confirm that the text "Hello World!" appears, otherwise refer to the Troubleshooting section.

For JBoss Enterprise Web Server, the contents of the User Data field are treated as a script. If the first line is "#!" then it is run as any executable file, otherwise its contents are executed/sourced into the Red Hat Enterprise Linux init shell.

If this is to be a production instance, add the following text to the contents of the User Data field, to ensure that security updates are applied on boot:

yum -y update
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 09:48:22 UTC, last content change 2012-05-22 12:43:50 UTC.