Monday, July 18, 2011

Steps to configure Apache HTTP Server Plug-In with Weblogic Server

Considering the Apache HTTP Server [Apache2.2] is already running as Windows service on port 8089 we shall continue to configure Apache HTTP Server Plug-In with Weblogic Server.
I am making use of Apache 2.2 and Weblogic 10.3 for this Post and demonstrating to access the Weblogic Console via Apache HTTP Server.

Steps to configure Apache HTTP Server Plug-In with Weblogic server
1. Identify the plug-in shared object file for your version of Apache in below table.
Apache Version
Regular Strength Encryption
128-bit Encryption
Standard Apache Version 2.0.x
mod_wl_20.so
mod_wl128_20.so
Standard Apache Version 2.2.x
mod_wl_22.so
mod_wl128_22.so

2. Verify that the WebLogic Server Apache HTTP Server Plug-In mod_so.c module is enabled.

The Apache HTTP Server Plug-In will be installed in your Apache installation as a Dynamic Shared Object (DSO). DSO support in Apache is based on module mod_so.c, which must be enabled before mod_wl_20.so is loaded. If you installed Apache HTTP Server using the script supplied by Apache, mod_so.c is already enabled. Verify that mod_so.c is enabled by executing the following command:
%APACHE_HOME%\bin\httpd.exe -l
-- Where APACHE_HOME is the directory containing your Apache installation

3. Copy the appropriate Weblogic Proxy plug-ins from Weblogic Installation to Apache installation.
Windows: %WEBLOGIC_HOME%\server\plugin\win\32\mod_wl_22.so to %APACHE_HOME%\modules\10.3\mod_wl_22.so
Solaris$WEBLOGIC_HOME/server/plugin/solaris/sparc/mod_wl_22.so to %APACHE_HOME%/modules/10.3/mod_wl_22.so

Note: To differentiate the version of Weblogic proxy plug-ins, create a directory named with Weblogic version under %APACHE_HOME%/modules

4. Install the Apache HTTP Server Plug-In module for Apache by adding the following line to your APACHE_HOME/conf/httpd.conf file manually:

#Weblogic Module 
LoadModule weblogic_module modules/mod_wl_20.so

5. Modify the below configuration and add it to the same APACHE_HOME/conf/httpd.conf to redirect calls to Weblogic instances as per your requirement. In my example below I am trying to access Weblogic console via Apache re-direction.

<IfModule mod_weblogic.c>
  WebLogicCluster     weblogicserver.com:7002

  Match Expression    *
  Debug                    ON
  WLLogFile               c:/tmp/global_proxy.log
  WLTempDir             "c:/myTemp"
  DebugConfigInfo     On
  KeepAliveEnabled     ON
  KeepAliveSecs         15
</IfModule>
<Location /console>
  SetHandler weblogic-handler

  PathTrim /console
</Location>


The Apache HTTP Server Plug-In recognizes the parameters listed in General Parameters for Web Server Plug-Ins. To modify the behavior of your Apache HTTP Server Plug-In, define these parameters: 
-- In a Location block, for parameters that apply to proxying by path, or 
-- In an IfModule block, for parameters that apply to proxying by MIME type  

6. Verify if the recently added configurations in the APACHE_HOME\conf\httpd.conf file is accurate with the following command:

%APACHE_HOME%\bin\httpd.exe -t 

The output of this command reports any errors in your httpd.conf file or returns:
Syntax OK 

7. Restart Apache HTTP Server.

8. Test the plug-in by opening a browser and setting the URL to the Apache Server + ":" + port + “/console”, which should bring up the default WebLogic Server HTML page, welcome file, or default servlet, as defined for the default Web Application on WebLogic Server. 
For example: 
http://apacheserver.com:8089/console
That's it.
Please do leave your valuable comments/queries on this post. 



13 comments:


  1. Hi,

    Thank you for your detailed explanation on Apache reverse proxy for WLS.

    I followed you steps and the syntax is correct.

    Only problem is when I request the apache URL like localhost/console its redirecting to ORacle Fussion middle ware home page instead of console logic screen.

    Any idea ?

    ReplyDelete
  2. This is the error log I am getting


    ================New Request: [GET /console HTTP/1.1] =================
    Sat Aug 18 16:47:35 2012 <626013453228553> INFO: SSL is not configured
    Sat Aug 18 16:47:35 2012 <626013453228553> Using Uri /console
    Sat Aug 18 16:47:35 2012 <626013453228553> After trimming path: '/'
    Sat Aug 18 16:47:35 2012 <626013453228553> The final request string is '/'
    Sat Aug 18 16:47:35 2012 <626013453228553> SEARCHING id=[localhost:7001] from current ID=[localhost:7001]
    Sat Aug 18 16:47:35 2012 <626013453228553> The two ids matched
    Sat Aug 18 16:47:35 2012 <626013453228553> @@@FOUND...id=[localhost:7001], server_name=[localhost], server_port=[7580]
    Sat Aug 18 16:47:35 2012 <626013453228553> attempt #0 out of a max of 5
    Sat Aug 18 16:47:35 2012 <626013453228553> Trying a pooled connection for '127.0.0.1/7001/7001'
    Sat Aug 18 16:47:35 2012 <626013453228553> getPooledConn: No more connections in the pool for Host[127.0.0.1] Port[7001] SecurePort[7001]
    Sat Aug 18 16:47:35 2012 <626013453228553> general list: trying connect to '127.0.0.1'/7001/7001 at line 2632 for '/'
    Sat Aug 18 16:47:35 2012 <626013453228553> INFO: New NON-SSL URL
    Sat Aug 18 16:47:35 2012 <626013453228553> Connect returns -1, and error no set to 10035, msg 'Unknown error'
    Sat Aug 18 16:47:35 2012 <626013453228553> EINPROGRESS in connect() - selecting
    Sat Aug 18 16:47:35 2012 <626013453228553> Local Port of the socket is 54906
    Sat Aug 18 16:47:35 2012 <626013453228553> Remote Host 127.0.0.1 Remote Port 7001
    Sat Aug 18 16:47:35 2012 <626013453228553> general list: created a new connection to '127.0.0.1'/7001 for '/', Local port:54906
    Sat Aug 18 16:47:35 2012 <626013453228553> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 200 OK]
    Sat Aug 18 16:47:35 2012 <626013453228553> URL::parseHeaders: StatusLine set to [200 OK]
    Sat Aug 18 16:47:35 2012 <626013453228553> parsed all headers OK
    Sat Aug 18 16:47:35 2012 <626013453228553> sendResponse() : r->status = '200'
    Sat Aug 18 16:47:35 2012 <626013453228553> canRecycle: conn=1 status=200 isKA=1 clen=11389 isCTE=0
    Sat Aug 18 16:47:35 2012 <626013453228553> closeConn: pooling for '127.0.0.1/7001'
    Sat Aug 18 16:47:35 2012 <626013453228553> request [/] processed successfully..................
    Sat Aug 18 16:47:55 2012 <626013453223911> timed out 1 connections, idle for (at least) 20 secs

    ReplyDelete
  3. all the time i used to read smaller content that also clear their motive, and that is also happening
    with this piece of writing which I am reading at this time.


    Look into my web blog; diet plans that work

    ReplyDelete
  4. Undeniably imagine that that you stated.
    Your favourite justification seemed to be on the web the simplest factor to understand of.
    I say to you, I definitely get irked at the same time as people consider
    worries that they just don't realize about. You managed to hit the nail upon the top and also outlined out the entire thing with no need side effect , other people can take a signal. Will likely be again to get more. Thank you

    Look into my blog post ... explorethecapabilities.com

    ReplyDelete
  5. Hello would you mind letting me know which web host you're using? I've loaded your blog
    in 3 completely different web browsers and I must say this
    blog loads a lot faster then most. Can you suggest a
    good web hosting provider at a fair price? Cheers,
    I appreciate it!

    My web blog: Continued

    ReplyDelete
  6. You actually make it seem really easy with your presentation however I in finding this matter to be really one thing that I think I might by
    no means understand. It seems too complex and extremely
    vast for me. I'm taking a look forward to your next post, I will attempt to get the cling of it!

    Feel free to visit my page: continue reading

    ReplyDelete
  7. I have read several just right stuff here. Definitely worth bookmarking for revisiting.
    I surprise how so much attempt you set to create one of these wonderful informative website.


    Also visit my web-site :: Oakley Sunglasses

    ReplyDelete
  8. Everyone loves what you guys are usually up too. This sort of clever work
    and reporting! Keep up the excellent works guys I've incorporated you guys to my blogroll.

    Look into my page: Michael Kors - -

    ReplyDelete
  9. Having read this I believed it was very informative.
    I appreciate you spending some time and effort to put this informative article together.
    I once again find myself spending way too much time both reading and commenting.
    But so what, it was still worthwhile!

    Also visit my page - Louis Vuitton Pas Cher

    ReplyDelete
  10. WOW just what I was searching for. Came here by searching for
    conge

    my blog :: Wholesael NFL Jerseys

    ReplyDelete
  11. At this moment I am going to do my breakfast, after having my breakfast coming over again to read further news.


    Also visit my web blog: Air Max ()

    ReplyDelete
  12. It looks like most of the anonymous comments above are spam. I wonder how could the blogspot.co.uk not identify spam comments and approve them?

    regards
    Joseph
    http://RapidIncomeGrneration.co.uk

    ReplyDelete
  13. Thank you for your great post and for helping others become more aware. I am really glad I found your blog.
    Germany VPS Server

    ReplyDelete