4 Configuring the Plug-In for Oracle HTTP Server

In this release of Oracle WebLogic Server, a single plug-in supports both Apache HTTP Server and Oracle HTTP Server.

The following section describes how to configure the plug-in for Oracle HTTP Server:

Configuring the Plug-In for Oracle HTTP Server

Note:

You do not have to download and set up the plug-in. Oracle HTTP Server comes pre-bundled with the mod_wl_ohs.so/dll binary.

To configure the mod_wl_ohs module using Fusion Middleware Control, do the following:

  1. Select Administration from the Oracle HTTP Server menu.

  2. Select mod_wl_ohs Configuration from the Administration menu. The mod_wl_ohs configuration page appears.

  3. If you are using a WebLogic cluster, enter the WebLogic Servers that can be used for load balancing in the WebLogic Cluster field. The server or cluster list is a list of host:port entries. If a mixed set of clusters and single servers is specified, the dynamic list returned for this parameter will return only the clustered servers.

    The module does a simple round-robin between all available servers. The server list specified in this property is a starting point for the dynamic server list that the server and module maintain. WebLogic Server and the module work together to update the server list automatically with new, failed, and recovered cluster members.

    You can disable the use of the dynamic cluster list by disabling the Dynamic Server List ON field. The module directs HTTP requests containing a cookie, URL-encoded session, or a session stored in the POST data to the server in the cluster that originally created the cookie.

  4. Use the WebLogic Host field to enter the WebLogic Server host (or virtual host name as defined in WebLogic Server) to which HTTP requests should be forwarded. If you are using a WebLogic cluster, use the WebLogic Cluster field instead of WebLogic Host.

  5. Use the WebLogic Port field to enter the port on which the WebLogic Server host is listening for connection requests from the module (or from other servers). (If you are using SSL between the module and WebLogic Server, set this parameter to the SSL listen port.

  6. If you want to use the dynamic cluster list for load balancing requests proxied from the module, then select the Dynamic Server List ON check box. When set to OFF, the module ignores the dynamic cluster list and only uses the static list specified with the WebLogic Cluster parameter. Normally this parameter should be set to ON.

  7. You can use the Error Page field to create your own error page that is displayed when your Web server is unable to forward requests to WebLogic Server.

  8. Use the Debug field to specify the type of logging performed for debugging operations. The debugging information is written to the /tmp/wlproxy.log file on UNIX systems and c:\TEMP\wlproxy.log on Windows systems. Override this location and filename by setting the Log File parameter to a different directory and file. Ensure that the tmp or TEMP directory has write permission assigned to the user who is logged in to the server.

    The Debug parameter can be set any of the following logging options. Additionally, the HFC, HTW, HFW, and HTC options can be set in combination by entering them separated by commas; for example: HFC,HTW.

    • ON – The module logs informational and error messages.

    • OFF – No debugging information is logged.

    • HFC – The module logs headers from the client, informational, and error messages.

    • HTW – The module logs headers sent to WebLogic Server, and informational and error messages.

    • HFW – The module logs headers sent from WebLogic Server, and informational and error messages.

    • HTC – The module logs headers sent to the client, informational messages, and error messages.

    • ERR – Prints only the Error messages in the module.

    • ALL – The module logs headers sent to and from the client, headers sent to and from WebLogic Server, information messages, and error messages.

  9. Use the Log File field to specify the path and file name for the log file that is generated when the Debug parameter is set to ON. You must create this directory before setting this parameter.

  10. Use the WebLogic Temp Directory field to specify the directory where a wlproxy.log will be created. If the location fails, the module resorts to creating the log file under c:/temp in Windows and /tmp in all UNIX platforms.

    This also specifies the location of the _wl_proxy directory for post data files. When both WebLogic Temp Directory and Log File are set, Log File will override as to the location of wlproxy.log. WebLogic Temp Directory will still determine the location of the _wl_proxy directory.

  11. Use the Exclude Path or Mime Type field to exclude certain requests from proxying. This parameter can be defined locally at the Location tag level as well as globally. When the property is defined locally, it does not override the global property but defines a union of the two parameters.

  12. The Match Expression region is used to specify any Expression overrides.

    Example when proxying by MIME type:

    *.jsp WebLogicHost=myHost|paramName=value
    

    It is possible to define a new parameter for Match Expression using the following syntax:

    *.jsp PathPrepend=/test PathTrim=/foo
    
  13. The Location region is used to specify any Location overrides.

    1. Click Add Row to create a new row.

    2. Enter the base URI for which following directives become effective.

    3. Complete the WebLogic Cluster, WebLogic Host, and WebLogic Port fields using the definitions supplied earlier in this section.

    4. For the Path Trim field, as per the RFC specification, generic syntax for URL is:

      [PROTOCOL]://[HOSTNAME]:{PORT}/{PATH}/{FILENAME};{PATH_PARAMS}/{QUERY_STRING}...
      

      Path Trim specifies the string trimmed by the module from the {PATH}/{FILENAME} portion of the original URL, before the request is forwarded to WebLogic Server. For example, if the URL:

      http://myWeb.server.com/weblogic/foo
      

      is passed to the module for parsing and if Path Trim has been set to strip off /weblogic before handing the URL to WebLogic Server, the URL forwarded to WebLogic Server is:

      http://myWeb.server.com:7002/foo
      

      Note that if you are newly converting an existing third-party server to proxy requests to WebLogic Server using the module, you will need to change application paths to /foo to include weblogic/foo. You can use Path Trim and Path Prepend in combination to change this path.

    5. For the Path Prepend field, as per the RFC specification, generic syntax for URL is:

      [PROTOCOL]://[HOSTNAME]:{PORT}/{PATH}/{FILENAME};{PATH_PARAMS}/{QUERY_STRING}...
      

      Path Prepend specifies the path that the module prepends to the {PATH} portion of the original URL, after Path Trim is trimmed and before the request is forwarded to WebLogic Server.

      Note that if you need to append File Name, use the DefaultFileName module parameter instead of Path Prepend.

    6. Complete the Log File and Debug fields using the definitions supplied earlier in this section.

    7. Click Add Row again to save the new row.

  14. Review the settings. If the settings are correct, click Apply to apply the changes. If the settings are incorrect, or you decide to not apply the changes, click Revert to return to the original settings.

  15. Restart Oracle HTTP Server.

The mod_wl_ohs module configuration is saved and shown on the mod_wl_ohs Configuration page.

Note:

If you are manually editing the mod_wl_ohs configuration settings instead of using Fusion Middleware Control, then all directives should be defined within the defined within the <IfModule weblogic_module> block of the mod_wl_ohs.conf file. mod_wl_ohs will continue to work if directives are defined outside of this block, but this could put the mod_wl_ohs Configuration page in Fusion Middleware Control in an inconsistent state.