Ubuntu 11.04
Sponsored Link

Enable proxy_http
  Foward requests to another web server by mod_proxy. This means configuring Web server as a revers proxy.

(1) www.srv.world
- Web Server #1

(2) mail.srv.world
- Web Server #2

This example set servers to (1) that requests to Web server (1) forward to under /test on webserver (2)

[1] Enable proxy_http
a2enmod proxy proxy_http

Enabling module proxy.
Considering dependency proxy for proxy_http:
Module proxy already enabled
Enabling module proxy_http.
Run '/etc/init.d/apache2 restart' to activate new configuration!
vi /etc/apache2/mods-enabled/proxy.conf

# 13-19: uncomment and change like follows

ProxyRequests On
<Proxy *>
    AddDefaultCharset off
    Order deny,allow
#     Deny from all
#     #Allow from .example.com
Allow from all

[2] Configure for forwarding
vi /etc/apache2/sites-available/default

# add these lines

<Location /proxy>

ProxyPass http://mail.srv.world/test

ProxyPassReverse http://mail.srv.world/test



/etc/init.d/apache2 restart

* Restarting web server apache2
... waiting ...done.
[3] Access to /proxy. Web server (2) replys as a following screen.
Matched Content