Using Apache ProxyPass on Ubuntu

Using Apache ProxyPass on Ubuntu


The 8080,80 ports are forbidden from ADSL. So I need to use apache as my proxy.

1. First step is to install apache2 on my system.
I have already done that. So I can jump to the next step.

2. Active modules in apache2:
>a2enmod proxy
>a2enmod proxy_http

3.  Change the default configuration, or create a file in that directory.
>cd /etc/apache2/sites-available
>vi default  
or
>vi sillycat

add these lines to default, or create the whole context just taking default as an sample:
ProxyPass        /easystruts2proxy http://localhost:8080/easystruts2proxy
ProxyPassReverse /easystruts2proxy http://localhost:8080/easystruts2proxy

4. Enable the new site and restart apache2:
>a2ensite sillycat    (optional)
>/etc/init.d/apache2 restart

references:
http://serbiancafe.wordpress.com/2006/10/20/apaches-proxypass-on-ubuntu/

猜你喜欢

转载自sillycat.iteye.com/blog/1012636