12 June 2008


Well it had to happen eventually -- welcome to Weblogic Server :-)

Thought I'd walk through how to configure Apache as the front end server for a Weblogic Server.

Turns out, it's as easy as the proverbial:
  1. Install WLS, create a domain, start it up
  2. Download and install Apache (I used 2.2)
  3. Copy the corresponding Apache module (for 2.2 I used mod_wl_22.so) from the WLS installation into $APACHE_HOME/modules directory
  4. Edit $APACHE_HOME/conf/httpd.conf and enable the mod_weblogic as follows:

    # Load BEA Module
    LoadModule weblogic_module modules/mod_wl_22.so

    # Config file for WebLogic Server that defines the parameters
    Include conf/mod_weblogic.conf

  5. Create the referenced mod_weblogic.conf file in which you place the configuration elements for mod_weblogic to use:

    # Basic config for mod_weblogic to point at my WLS instance

    WebLogicHost localhost
    WebLogicPort 7001
    Debug ON
    WLLogFile c:\temp\wlproxy.log
    WLTempDir c:\temp
    DebugConfigInfo On

    # Map the URLs to expose via Apache
    # Expose the console via Apache

    SetHandler weblogic-handler

  6. Test the config with Apache

    $APACHE_HOME\bin\httpd -t

  7. Start Apache
  8. Access the console via Apache (assuming all default ports)


And that's the basic set of steps -- you should be looking at the WLS console being serviced via Apache.

With the config above, I've enabled the DebugConfigInfo option -- which allows you to see a bunch of useful debug/usage information by entering a URL serviced by mod_weblogic and tacking on a request parameter of the form ?__WebLogicBridgeConfig.

No comments: