How To Port Forrard Apache's Lxxx To Glassfish's 8080 Using Proxy Configuration

Recently, I'm developing as well as testing an application deployed on Glassfish that runs on port 8080. Then I produce ask the app to run on port 80, since I don't desire to alter the default port of Glassifh from 8080 to 80, I've merely installed apache as well as displace port forwarding, it worked as well as here's how I did it (I've done it inwards Ubuntu 11.10).

1.) Make certain that you lot convey download, installed as well as configured Glassfish to run on port 8080. (Just ask to download the zipped file from oracle: http://glassfish.java.net/downloads/).

2.) Download, installed as well as configured apache on port 8080.
sudo apt-get install apache2 

3.) Enable proxy, proxy_http as well as rewrite modules on apache:
sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod rewrite 

4.) Create your custom apache proxy configuration file within /etc/apache2/conf.d
NameVirtualHost *:80 <VirtualHost *:80>  ProxyPreserveHost on  RewriteEngine on  ProxyPass / http://localhost:8080/  ProxyPassReverse / http://localhost:8080/  Redirect / http://localhost:8080/  RewriteRule ^/(.*) http://localhost:8080/$1 [P,L] </VirtualHost> 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.