Sunday, April 10, 2016

Apache proxy configurations for windows

Apache proxy configurations for windows


Http apache2 server can be configured in both forward proxy,reverse proxy and also known as gateway mode.Proxy is intermediate between client and server,Client send request to the server,but actually that request receive to the proxy server and it gets the request and redirect it to the original server.and get the content from the server and response back to the client as behaving original target endpoint.



In here client only knows number1 indicating area.Server only knows the number2 indicating area.

First of all we need to configure the apache2 server to behave as a proxy(gateway mode.)
These configurations are depend on OS platform.Earlier I described that how to configure the apache proxy in linux environment.Now We can see how to configure in windows environment.

1. Download the Apache server from http://www.apachelounge.com/download/
2. Open httpd.conf in "Apache_home\conf"
3. Uncomment below lines in 'httpd.conf' (Search for mod_proxy)

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_http_module modules/mod_proxy_http.so


4. Add below lines at the end of the file 'httpd.conf' for Proxy passing

ProxyPass <proxyname> <endpointURL>
eg:

ProxyPass "/foo" "http://foo.example.com/bar"  
ProxyPassReverse "/foo" "http://foo.example.com/bar"
 

5. Restart the Server.

No comments:

Post a Comment