JBoss Application Server 7 on Port 80 with Apache HTTPd ProxyPass
It’s quite simple really. All you need to do is install Apache HTTPd, then set make sure you have a few modules installed and set up: Instructions below are for Ubuntu, Fedora, RHEL, or other Linux distributions. So what are you waiting for? Let’s get our JBoss / Apache love on.
The 9 steps to proxy success!
- Install Apache2.
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod vhost_alias
sudo a2dissite default(only if you are not using this site, or haven’t made changes to it)
- Create a file called jboss-as in /etc/apache2/sites-available:
<VirtualHost *:80> ServerAdmin email@example.com ServerName site.com ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPreserveHost on ProxyPass / http://localhost:8080/ </VirtualHost>
sudo a2ensite jboss-as
- Make sure your JBoss AS 7 instance is running on port 8080, and is accepting connections from localhost.
sudo /etc/init.d/apache2 restart-or-
service apache2 restart