Jetty and Apache Stack

First Install The OS

First install the latest version CentOS 7 on your Dedicated or VPS server.

Second Install webuzo

There are 2 ways to install Webuzo depending on your skill level. This installation installs Webuzo with the basic LAMP stack (Linux, Apache, MySQL and PHP). You can choose to ssh in and run bash commands or install via your webui. (The web gui is only available for VPS solution.

Install Via SSH

wget -N http://files.webuzo.com/install.sh
chmod 0755 install.sh
./install.sh

Install from Web GUI

Log into your VPS control panel, click on Control Panel icon and choose Webuzo<\strong>.

Configure webuzo

Once installed you will need to configure webuzo, goto http://IPaddress:2040 and input username, password, nameservers. Keep the license field empty since license will auto activate once purchased.

Get Webuzo license and activate

Go to https://webuzo.com/pricing and purchase a license for your IP address

Configure Domain A Record

For the configuration to work, your domain must be pointed to the VPS or dedicated server IP. Create an A (Address) record in your dns to point to this IP.

Install Jetty

  1. Login at http://[Your_Server_IP]:2002/ with the admin user you just created in previous step
  2. Search for Jetty.
  3. Click Jetty in list to open up overview.
  4. Click install button to install
    .
    Jetty will be installed at /usr/local/apps/ on default ports that being port 8080 for web

Start jetty

Start jetty from ssh using commands below.

ssh root@[Your_Server_IP]
/usr/local/apps/jetty/bin/jetty.sh start

You should be able to test your jetty installation using the 8080 port. http://:8080

Configure Apache to Proxy Jetty

Create a file named proxy.conf in your local machine with below contents:

ProxyPreserveHost On
ProxyPass / http://localhost:8080/ retry=5
ProxyPassReverse / http://localhost:8080/

Go to http://[Your_Server_IP]:2002/ >> Extra Configuration >> Upload the proxy.conf file and ‘Add record’

You will then be able to access Jetty using your domain. For example its http://your_domain.com/

Stop, Start or Restart Jetty

You must use SSH to control jetty status.
/usr/local/apps/jetty/bin/jetty.sh {start|stop|run|restart|check|supervise}

ssh root@[Your_Server_IP]
/usr/local/apps/jetty/bin/jetty.sh start
/usr/local/apps/jetty/bin/jetty.sh stop
/usr/local/apps/jetty/bin/jetty.sh restart

You can check jetty status with check.

/usr/local/apps/jetty/bin/jetty.sh check

Example result:

# /usr/local/apps/jetty/bin/jetty.sh check
Checking arguments to Jetty: 
START_INI      =  /usr/local/apps/jetty/start.ini
START_D        =  /usr/local/apps/jetty/start.d
JETTY_HOME     =  /usr/local/apps/jetty
JETTY_BASE     =  /usr/local/apps/jetty
JETTY_CONF     =  /usr/local/apps/jetty/etc/jetty.conf
JETTY_PID      =  /var/run/jetty.pid
JETTY_START    =  /usr/local/apps/jetty/start.jar
JETTY_LOGS     =  /usr/local/apps/jetty/logs
JETTY_STATE    =  /usr/local/apps/jetty/jetty.state
CLASSPATH      =  
JAVA           =  /usr/bin/java
JAVA_OPTIONS   =  -Djetty.logs=/usr/local/apps/jetty/logs -Djetty.home=/usr/local/apps/jetty -Djetty.base=/usr/local/apps/jetty -Djava.io.tmpdir=/tmp
JETTY_ARGS     =  jetty.state=/usr/local/apps/jetty/jetty.state jetty-logging.xml jetty-started.xml
RUN_CMD        =  /usr/bin/java -Djetty.logs=/usr/local/apps/jetty/logs -Djetty.home=/usr/local/apps/jetty -Djetty.base=/usr/local/apps/jetty -Djava.io.tmpdir=/tmp -jar /usr/local/apps/jetty/start.jar jetty.state=/usr/local/apps/jetty/jetty.state jetty-logging.xml jetty-started.xml

Jetty running pid=16633
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Tomcat and Apache Stack

This article explains how to setup Tomcat and Apache web server to route traffic over port 80 on...