Fedora 13
Sponsored Link

mod_proxy2010/06/03

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

(1) dlp.srv.world
[10.0.0.30]
- Web server #1

(2) www.srv.world
[10.0.0.31]
- Web server #2


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

[1] Configure for mod_proxy
[root@dlp ~]#
vi /etc/httpd/conf/httpd.conf


# add at the bottom

# a directory you'd like to foward

<Location /proxy>
  
# a destination directory that is forwared

   ProxyPass http://www.srv.world/test
   ProxyPassReverse http://www.srv.world/test
</Location>


[root@dlp ~]#
/etc/rc.d/init.d/httpd restart

Stopping httpd:
[  OK  ]

Starting httpd:
[  OK  ]

  Access with web browser. First, access to the place that does not have forwarding setting. Web server (1) replys normally as a following screen.
 
  Access to /proxy. Web server (2) replys as a following screen.
 
Matched Content