Thursday, July 6, 2017

Steps to integrate Weblogic Server with Apache Http Server 2.4.x using WLS Plugin



Introduction


Oracle Weblogic Server proxy plugin 12.2.x for Apache Http Server is supported on Apache 2.2 & 2.4 web servers


Environment Details
OS : Red hat linux 3.10.x   x86_64 Architecture
WLS Version : 12.2.1.2
Apache Server version : 2.4.6.x
Plugin Version : 12.2.x


Steps  are below  to integrate  Weblogic Server 12.2.1.2 with Apache Http Server 2.4.x using WLS Plugin 12c


1. Install Weblogic Server 12c (latest 12.2.1.2.0)


Refer below site

https://oracle-base.com/articles/12c/weblogic-installation-on-oracle-linux-6-and-7-1221

2 . Download and Install Apache HTTP Server (2.4.x)
http://httpd.apache.org/download.cgi


Installation Guide
http://httpd.apache.org/docs/2.4/install.html


OR
To use yum rpm installer on Linux , following this link from Redhat

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/chap-Managing_Confined_Services-The_Apache_HTTP_Server.html



Refer link below to Install http service on Linux and starting & stopping service. Refer this below doc

https://www.cyberciti.biz/faq/linux-install-and-start-apache-httpd/



Sample commands

service httpd start
service httpd stop
service httpd restart
service httpd status



Run below command to verify if Apache Http Server is already installed
$ rpm -q httpd

Sample output : httpd-2.4.6-45.el7_3.4.x86_64



3. Download latest plugins of Apache Http Server for WLS 12c  from below site for your OS Version
http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html


4.  Extract the plug-ins zip distribution to PLUGIN_HOME
and move the below .so file



mod_wl_xx*.so to ..%apache_home%/modules directory


5.  Set/Export  LD_LIBRARY_PATH to extracted ${PLUGIN_HOME}/lib folder..


For eg

export LD_LIBRARY_PATH=.../weblogic-plugins-12.2.1/lib


6. Modify the httpd.conf file located under 
/etc/httpd/conf   or Apache_home/conf folder

Add the below snippet to the end of the file

LoadModule weblogic_module modules/mod_wl_24.so

<IfModule mod_weblogic.c>
  WebLogicHost 127.0.0.1
 WebLogicPort 7001
 #MatchExpression *.jsp
 MatchExpression /*
 DebugConfigInfo ON
</IfModule>



 Note: Backup httpd.conf file
##Line LoadModule loading  mod_wl_24.so  for Apache web server 2.4.x

For 2.2.xversion , use below lin

LoadModule weblogic_module /home/myhome/weblogic-plugins-12.2.1/lib/mod_
wl.so 

7. Restart Http Server and Weblogic Server

8. Hit the weblogic console using the link below to test
http://localhost/console



Misc




If you choose to not use the <IfModule>, you can instead directly place the WebLogic
properties inside Location or <VirtualHost> blocks.
Consider the following examples of the <Location> and <VirtualHost> blocks:
<Location /weblogic>
WLSRequest On
WebLogicHost myweblogic.server.com
WebLogicPort 7001
</Location>
<Location /weblogic>
WLSRequest On
WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001
</Location>
<VirtualHost apachehost:80>
WLSRequest On
WebLogicServer weblogic.server.com
WebLogicPort 7001
</VirtualHost>


2 comments:

  1. How to configure Apache HTTPD.conf file for port based virtual hosting using Weblogic plugin? Do we have to have as many HTTPS.conf files?

    ReplyDelete
  2. Nice articel, This article help me very well. Thank you. Also please check my article on my site Know All About Htaccess Tutorial. In link article we will learn about How to use .htaccess file?.

    ReplyDelete