Hi,

Jay SenSharma

Here is a Simple demonstration of using Apache Proxy Plug-In as a repository for caching Static Contents like Image files And Html pages…this helps us in improving the performance of the Backend Servers.

In the following demonstration we will see how we can Configure Apache plugin with WebLogic Server- 10.3.2, Same step can be followed with any other version of weblogic Server as well.

Step1).

Install Apache proxy plugin in your Box… This is quite simple step.

Step2).

Copy the “mod_wl_20.so” or “mod_wl_22.so” file from the following location of your WebLogic Server  (E:\bea10_3_2\wlserver_10.3\server\plugin\win\32)  … I m using WLS10.3.2 … I am choosing “mod_wl_20.so” for this demonstration …you can choose any of the file based on your requirements…

WebLogic Plugin Module Copying

Step3).

Goto the Apache Installation directory in your Box  and then Paste “mod_wl_20.so” in the following location “C:\Program Files\Apache Group\Apache2\modules”

Pasting the WebLogic Apache Module In Apache Installation

Step4).

Move inside the “C:\Program Files\Apache Group\Apache2\conf” directory to configure the Apache to provide the “LoadModule” information inside the “httpd.conf” file:

Example:   LoadModule weblogic_module modules/mod_wl_20.so

httpd.conf file location

Editing the httpd.conf to add the "LoadModule"

Step5).

Now add the If Module information inside “httpd.conf” file to point to WebLogic Server which is running on localhost:7001 ….Just add the following line of code at the bottom of the “httpd.conf” file:

<IfModule mod_weblogic.c>
WebLogicHost 127.0.0.1
WebLogicport 7001
MatchExpression /*
</IfModule>

—–If you have a WebLogic Cluster than you can use the below configuration as well—-

<IfModule mod_weblogic.c>
WebLogicCluster  MS1HostName:7003,MS2HostName:7005
MatchExpression /*
</IfModule>

Step6).

Now restart WebLogic Server and Apache Proxy as well…

Starting WLS as well as Apache Plugin

Step7).

Now Just test whether you are able to hit the WebLogic Server through Apache or not:

http://localhost:80/console

Hitting WebLogic Console through Apache Plugin

Step8).

. Now The most important part ..we are going to add some static Pages inside the Apache Plugin…so in order to do that…Add the following configuration change inside your “C:\Program Files\Apache Group\Apache2\conf\httpd.conf” file…..Add a VirtualHost Tag there like below:
<VirtualHost *:80>
ServerName myServer
DocumentRoot “C:/Program Files/Apache Group/Apache2/htdocs”
</VirtualHost>
Like Following:

Final Configuration change in "httpd.conf"

I developed a very simple “welcome.html” page here
<html>
<head>
<title>Apache Static Page</title>
</head>
<body>
<h1> Hi this is a Page Coming from Apache </h1>
<img src=”osho.jpg”/>
</body>
</html>

Step9).

Now Add a Folder “TestAppOne” iin the following location:  ”C:\Program Files\Apache Group\Apache2\htdocs” with your static contents inside it….Example:

Adding TestApplication inside "htdocs"

Step10).

Restart your Apache Plugin and then hit the following URL:

http://localhost/TestAppOne/welcome.html

Finally Hitting the Static Content through Apache Proxy....

.

.

Thanks

Jay SenSharma