The term “Proxy Servers” is mostly popular among our middleware techies as: “Server which forwards the request”.
But, for simple multiple reasons, this one lined defined server is vastly used in each and every environment in multiple forms like Forward Proxy Server, Reverse Proxy Server and Open Proxy Server.
The basic purpose of this document is to cover what is a proxy server, understanding of different proxy servers, configuration of Reverse proxy server.
Defining Proxy Server: Proxy Server is an intermediary server between your web browser (client) which requests for some information/data and your server (web server/Application server) that process the data.
Following is the schematic representation of the proxy server:-
Types of Proxy Server: They are three different types of proxy servers. They are as follows:
1) Forward Proxy Server
2) Open Proxy Server
3) Reverse Proxy Server
Forward Proxy Servers: Forward Proxy Server is a server which forwards the request from the intranet clients (web browser) to the internet servers. These proxy servers are present in the same network of your client. Schematically, we can represent any forward proxy servers as follows:
Open Proxy Server: An open proxy is a proxy server which is accessible by any Internet user. Any proxy server that doesn’t restrict its client base to its own set of clients and allows any other client to connect to it is known as an “Open Proxy”. An anonymous open proxy allows users to conceal their IP address while browsing the Web or using other Internet services. They are in numerous open proxy servers present in Internet. For converting any flavor of proxy servers to Open Proxy servers we just have to enable the flag “ProxyRequests On” in the configuration file.
Following is the pictorial view of understanding our open proxy servers:
Reverse Proxy Server: A Proxy Server which takes requests from external clients (web browsers) or Internet and forwards them to servers in an internal network is called as Reverse Proxy Server. Generally, the reverse proxy servers are present in the same network where we have our App/Web servers.
Schematically we can represent all of our reverse proxy servers as follows:
After understanding the different types of proxy servers lets try knowing more about reverse proxy servers especially the advantages and configuration of proxy servers.
Advantages of using Reverse Proxy Servers:
The various advantages of using the proxy servers are as follows:
3) Bypassing filters and censorship
4) Logging and eavesdropping
5) Gateways to private networks
6) Accessing services anonymously
Understanding and comparing these advantages with the other flavors of proxy servers every one of us would be interested to use the reverse proxy servers. So, lets try understanding how do we do the configuration of the reverse proxy servers.
Most of the present day proxy servers have the ability or the behavior to act as reverse proxy servers with an addition of a small module. Since, discussing about the configuration of all of those reverse proxy server with weblogic server wouldn’t be possible, this document restricts its scope only to Apache Server.
Configuration of Apache Reverse Proxy Server with Weblogic Server:
To begin the configuration of apache reverse proxy server, Lets consider a public site http://weblogic-wonders.com (or an application you deployed on cluster) which has a public IP and DNS entry and could be accessed across the globe.
Let’s consider that the application server on which this site is hosted is our weblogic application server having the two instances weblogic_Instance1.com, weblogic_Instance2.com.
Following are the steps for configuring the apache proxy server with weblogic servers:-
1) Post installing and creating a domain in weblogic server copy mod_wl_20.so file from weblogic server to apache server modules folder.
2) Download libxml2 (version shouldn’t be older than 2.6) from http://xmlsoft.org and install it.
3) Copy and paste the file to the paths: /usr/lib/libxml2.so, with headers in /usr/include/libxml2/libxml/
4) Download mod_proxy_html and mod_xml2enc from http://apache.webthing.com/
5) Load the following configuration inside the httpd.conf of our apache server:-
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
ProxyPass /app1/ http://weblogic_Instance1.com/
ProxyPass /app2/ http:// weblogic_Instance2.com/
ProxyHTMLURLMap http:// weblogic_Instance1.com /app1
ProxyHTMLURLMap http:// weblogic_Instance2.com /app2
ProxyHTMLURLMap / /app1/
RequestHeader unset Accept-Encoding
ProxyHTMLURLMap / /app2/
RequestHeader unset Accept-Encoding
6) Now, restart the apache server and weblogic application server instances.
1) http://www.google.com – Special, Special thanks .. 🙂