Old 07-05-2009, 10:11 AM   #1 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,649
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Post How to Configure Revers Proxy With Apache2

Hi,
Follow my guide to installa and configure a revers proxy in Apache2.

Open terminal or ssh and run:
Code:
a2enmod proxy
a2enmod proxy_http
And
Code:
a2enmod rewrite
Now edit /etc/apt/sources.list add or uncomment:
Code:
deb http://ftp.debian.org/debian lenny main contrib non-free
deb http://security.debian.org lenny/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb http://www.backports.org/debian lenny-backports main contrib non-free
Now run:
Code:
apt-get update
Then run:
Code:
apt-get install libapache2-mod-proxy-html
Now open the /etc/apt/sources.list and comment or delete the sources you added.
Run:
Code:
apt-get update
Verify that the untangle server only upgrades agains untangle servers.

Now create the new site file
Code:
nano /etc/apache2/sites-available/newsite
In this file Enter:
Code:
<VirtualHost *:80>
  ServerName dnsname_to_server_or_ip.com
  ProxyRequests Off
  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
  ProxyPass /subfolder/i !
  ProxyPass /subfolder http://Internalserver_dns_or_ip/
  ProxyPassReverse /subfolder http://Internalserver_dns_or_ip/
</VirtualHost>
*if it is a "https" site use "SSLProxyEngine on"
Now go to:
Code:
/etc/apache2/sites-enabled
And run:
Code:
a2ensite newsite
Now reload Apache
Code:
/etc/init.d/apache2 reload
Lets make sure that the proxy was installd.
Go to:
Code:
/etc/apache2/mods-enabled
Run:
Code:
a2enmod proxy
&
Code:
a2enmod proxy_http
Then restart the apache.
Code:
/etc/init.d/apache2 restart
If all workt try accessing http://Untangleip_or_DNS/subfilder

Enjoy.

Last edited by WebFooL; 07-23-2009 at 06:37 AM..
WebFooL is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 07:58 PM.


© 2010 Untangle, Inc. All Rights Reserved.   SEO by vBSEO 3.6.0