
Reverse Proxy is a gateway and it’s appears to the client like an ordinary web server. In this article, i will show quick steps to setup and configure Apache Reverse Proxy server. We need to add reverse proxy configuration into configuration to tell apache where it should be redirecting or caching information for clients that request for information. In this case, the following servers will involve in the setup.
(Server1) http://www.ehowstuff.local –> 192.168.2.54
(Server2) http://web.ehowstuff.local –> 192.168.2.55
When the client browsing /web on Server1, the traffic will redirecting to Server2.
Apache Reverse Proxy Configuration for Linux CentOS 6/ RHEL 6/ Oracle Linux 6
1. To use the Apache proxy directives, the following modules should be loaded :
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so
2. Configure /web on Apache web server on Server1 :
# vi /etc/httpd/conf.d/reverse_proxy.conf
Add this lines :
<IfModule mod_proxy.c> ProxyRequests Off <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass /web http://web.ehowstuff.local ProxyPassReverse /web http://web.ehowstuff.local </IfModule>
3. Restart or reload Apache to take effect :
# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
4. Browse the URL http://www.ehowstuff.local/web as below :
