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:
1) Filtering
2) Caching
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 https://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
LoadFile /usr/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
ProxyRequests off
ProxyPass /app1/ http://weblogic_Instance1.com/
ProxyPass /app2/ http:// weblogic_Instance2.com/
ProxyHTMLURLMap http:// weblogic_Instance1.com /app1
ProxyHTMLURLMap http:// weblogic_Instance2.com /app2
<Location /app1/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /app1/
RequestHeader unset Accept-Encoding
</Location>
<Location /app2/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /app2/
RequestHeader unset Accept-Encoding
</Location>
6) Now, restart the apache server and weblogic application server instances.
Reference:
1) http://www.google.com – Special, Special thanks .. 🙂
2) http://cybergav.in/2009/09/09/how-to-configure-apache-2-x-as-a-reverse-proxy/
Hi Shankar,
Could you tell me what is the use of libxml2.so file?
As per my understanding it is not a plug in file as you are using mod_wl_20.so file here as a plug in file.
Hi Sahil,
libxml1.so is a shared object file written in native language used as an XML parser.
For more information about the libxml refer to the below link:
http://xmlsoft.org/
Hi Shankar,
Whats the difference between this procedure and the one that is defined in the weblogic documentation for plugin configuration. Also, how could you proxy requests to a cluster of weblogic servers using the above.
Hi Shawn,
Imnt sure which link you are referring the weblogic doc …
If you are referring to the below link:
http://download.oracle.com/docs/cd/E13222_01/wls/docs100/plugins/apache.html
This is used to configure proxy server
But, this particular configuration is meant for configuring of reverse proxy server.
Shankar, Thanks for the response.
Sorry!! I do not understand the difference. If you would’t mind explaining why/when would we choose to do reverse proxy server instead of the normal proxy plugin configuration.
Hi Shawn,
Reverse proxy servers are used whenever we want to hit the servers directly.
These reverse proxy servers are present inside the client network.
They stand in-front of our web-servers!!
Thanks Shankar!!
So, as i understand, the reverse proxy servers can’t be used for load balancing like plugins can be right?
They also can be …. infact present day proxy server(eg: Apache 2.x onwards) can also work as reverse proxy server!!
HI friends plz guide mt how to configure reverseproxy to the weblogicserver on linux operating system
The steps should be the same even on Linux…
ProxyPass http://localhost:8001/testapp
ProxyPassReverse http://localhost:8001/testapp
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/
Here i am uanble to understand what files to copy from what folders.
i am unable to download mod_proxy_html mod_xml2enc file file.Plz suggest me