How to integrate weblogic and apache web server - Steps

Weblogic and Apache Webserver integration

To Integrate Weblogic Application server with Apache Webserver, We have to install weblogic plugin on the Apache HTTP Server.
Plugins for Apache will be available on Oracle (or) you can find them in your weblogic installed location under " ServerRoot/server/plugins"
Under plugins directory of weblogic server root  you could be able to find the "mod_wl.so" module file for Apache. Copy the same to Apache modules directory ( C:\Program Files (x86)\Apache Group\Apache2\modules)
For information on configurations on which the Apache HTTP Server Plug-In is supported, see here.
 
Now go to the conf directory located under apache installation root.
 
Edit the httpd.conf  file of Apache web server and  add the below line to load the weblogic module
LoadModule weblogic_module   modules\mod_wl_20.so

Now its the time to verify, If everything OK with the configuration use the below command to perform apache configuration (or) syntax check.

Apache -t (or) apachectl -t

If the syntax check is OK. you can proceed further else there can be any error with the httpd.conf file or module.

Now we need to configure the properties of plugin and mention the application server configuration information.

<IfModule mod_weblogic.c>  
WebLogicHost localhost   
WebLogicPort 7001   
MatchExpression *.jsp   
MatchExpression *.xyz
</IfModule>

If you want to route the requests to proxy and a cluster servers use the WeblogicCluster property instead of WeblogicHost

<IfModule mod_weblogic.c>  
WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001   
MatchExpression *.jsp   
MatchExpression *.xyz
</IfModule>

You have to make a listener configuration to let Apache know how to handle the request when its getting a request with specific URI. ( to know more what is URL and URI click here)

In our case, we have the application called Calendar is installed already in Weblogic Adminserver and its accessible via the following URL

http://localhost:7001/Calendar

Here /Calendar is our Context root (URI)

<Location /Calendar>
  SetHandler weblogic-handler
</Location>

In some versions of Apache "Pathtrim" is must be added with the SetHandler directive

<Location /Calendar>
  SetHandler weblogic-handler
  PathTrim /Calendar
</Location>

Now start your Apache Server and weblogic server.

apachectl -k start & DOMAIN_HOME/bin/startWeblogic.cmd

Access the calendar application using the web server IP (or) URL

http://localhost/Calendar