WebLogic Plug-Ins
WebLogic Plug-Ins
WebLogic Plug-Ins
Server
Version 9.2
Document Revised: June 27, 2007
Contents
iii
iv
vi
CHAPTER
This section describes the contents and organization of this guideUsing Web Server Plug-Ins
with WebLogic Server.
z
This chapter, Introduction and Roadmap, introduces the organization of this guide.
Chapter 2, Understanding Using Web Server Plug-Ins With WebLogic Server, describes
the plug-ins available for use with WebLogic Server.
Chapter 3, Installing and Configuring the Apache HTTP Server Plug-In, explains how to
install and configure the WebLogic Server Apache plug-in.
1-1
I n tr o d uct i o n a nd R o a dm a p
Chapter 4, Installing and Configuring the Microsoft IIS Plug-In, explains how to install
and configure the WebLogic Server plug-in for the Microsoft Internet Information Server.
Chapter 5, Installing and Configuring the Netscape Enterprise Server Plug-In, explains
how to install and configure the Netscape Enterprise Server proxy plug-in.
Chapter 6, Proxying Requests to Another Web Server, describes the use of WebLogic
Server as a proxy, forwarding HTTP requests to other Web servers.
Chapter 7, Parameters for Web Server Plug-Ins, discusses the parameters for Web server
plug-ins.
Related Documentation
This document contains information on using Web server plug-ins.
For information on using a proxy plug-sin, see the following document:
z
Using WebLogic Server Clusters for information on load balancing servlets and JSPs using
a proxy plug-in.
1-2
CHAPTER
The following sections describe the plug-ins provided by BEA Systems for use with WebLogic
Server:
z
2-1
Note: These libraries are available if you custom install WebLogic Server and explicitly select
the plug-ins.
2-2
CHAPTER
The following sections describe how to install and configure the Apache HTTP Server Plug-In:
z
3-1
process, possibly on a different host. To the end userthe browserthe HTTP requests
delegated to WebLogic Server still appear to be coming from the same source.
HTTP-tunneling, a technique which allows HTTP requests and responses access through a
companys firewall, can also operate through the plug-in, providing non-browser clients access
to WebLogic Server services.
The Apache HTTP Server Plug-In operates as an Apache module within an Apache HTTP
Server. An Apache module is loaded by Apache Server at startup, and then certain HTTP requests
are delegated to it. Apache modules are similar to HTTP servlets, except that an Apache module
is written in code native to the platform.
For information on configurations on which the Apache HTTP Server Plug-In is supported, see
http://edocs.bea.com/platform/suppconfigs/configs92/92_over/add-ons.html.
Proxying Requests
The plug-in proxies requests to WebLogic Server based on a configuration that you specify. You
can proxy requests based on the URL of the request (or a portion of the URL). This is called
proxying by path. You can also proxy requests based on the MIME type of the requested file. Or
you can use a combination of the two methods. If a request matches both criteria, the request is
proxied by path. You can also specify additional parameters for each type of request that define
additional behavior of the plug-in. For more information, see Configuring the Apache HTTP
Server Plug-In on page 3-6.
Apache 2.2
Although this document refers to Apache 2.0, you can apply the same instructions to use Apache
2.2 with the libraries shown in Table 3-2.
3-2
Certifications
The Apache HTTP Server Plug-In is supported on Linux, Solaris, Windows, and HPUX11
platforms. For information on support for specific versions of Apache, see
http://edocs.bea.com/platform/suppconfigs/configs92/92_over/add-ons.html.
3-3
Operating
System
Solaris
Linux
WL_HOME/weblogic92/server/plugin/linux/i686
WL_HOME/weblogic92/server/plugin/linux/ia64
WL_HOME/weblogic92/server/plugin/linux/s390
WL_HOME/weblogic92/server/plugin/linux/x86_64
Windows (Apache
2.0 only)
WL_HOME\weblogic92\server\plugin\win\32 or
WL_HOME\weblogic92\server\plugin\win\64
WL_HOME\weblogic92\server\plugin\win\x64
HPUX11
WL_HOME/weblogic92/server/plugin/hpux11/IPF64
WL_HOME/weblogic92/server/plugin/hpux11/PA_RISC
WARNING: If you are running Apache 2.0.x server on HP-UX11, set the
environment variables specified immediately below before
you build the Apache server. Because of a problem with the
order in which linked libraries are loaded on HP-UX, a core
dump can result if the load order is not preset as an
environment variable before building. Set the following
environment variables before proceeding with the Apache
configure, make, and make install steps, (described in
Apache HTTP Server documentation at
http://httpd.apache.org/docs-2.1/install.html#configure):
export EXTRA_LDFLAGS="-lstd -lstream -lCsup -lm -lcl
-ldld -lpthread"
Choose the appropriate version of the plug-in shared object from the following table:
3-4
128-bit Encryption
mod_wl_20.so
mod_wl28_20.so
mod_wl_22.so
mod_wl28_22.so
(Where APACHE_HOME is the directory containing your Apache HTTP Server installation.)
This command lists all enabled modules. If mod_so.c is not listed, you must rebuild your
Apache HTTP Server, making sure that the following options are configured:
...
--enable-module=so
--enable-rule=SHARED_CORE
...
modules/mod_wl_20.so
5. Define any additional parameters for the Apache HTTP Server Plug-In.
3-5
The Apache HTTP Server Plug-In recognizes the parameters listed in General Parameters
for Web Server Plug-Ins on page 7-2. 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 the syntax of the APACHE_HOME\conf\httpd.conf file with the following command:
APACHE_HOME\bin\apachectl -t
The output of this command reports any errors in your httpd.conf file or returns:
Syntax OK
3-6
modules\mod_wl_20.so
4. To proxy requests by MIME type, add a MatchExpression line to the IfModule block. Note
that if both MIME type and proxying by path are enabled, proxying by path takes precedence
over proxying by MIME type.
For example, the following IfModule block for a non-clustered WebLogic Server specifies
that all files with MIME type .jsp are proxied:
<IfModule mod_weblogic.c>
WebLogicHost myweblogic.server.com
WebLogicPort 7001
MatchExpression *.jsp
</IfModule>
3-7
If you are proxying requests by MIME type to a cluster of WebLogic Servers, use the
WebLogicCluster parameter instead of the WebLogicHost and WebLogicPort
parameters. For example:
<IfModule mod_weblogic.c>
WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001
MatchExpression *.jsp
MatchExpression *.xyz
</IfModule>
5. To proxy requests by path, use the Location block and the SetHandler statement.
SetHandler specifies the handler for the Apache HTTP Server Plug-In module. For example
the following Location block proxies all requests containing /weblogic in the URL:
<Location /weblogic>
SetHandler weblogic-handler
PathTrim /weblogic
</Location>
The PathTrim parameter specifies a string trimmed from the beginning of the URL before
the request is passed to the WebLogic Server instance (see General Parameters for Web
Server Plug-Ins on page 7-2).
6. Optionally, enable HTTP tunneling for t3 or IIOP.
a. To enable HTTP tunneling if you are using the t3 protocol and weblogic.jar, add the
following Location block to the httpd.conf file:
<Location /HTTPClnt>
SetHandler weblogic-handler
</Location>
b. To enable HTTP tunneling if you are using the IIOP, the only protocol used by the
WebLogic Server thin client, wlclient.jar, add the following Location block to the
httpd.conf file:
<Location /iiop>
SetHandler weblogic-handler
</Location>
7. Define any additional parameters for the Apache HTTP Server Plug-In.
The Apache HTTP Server Plug-In recognizes the parameters listed in General Parameters
for Web Server Plug-Ins on page 7-2. To modify the behavior of your Apache HTTP
Server Plug-In, define these parameters either:
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.
3-8
The syntax of weblogic.conf files is the same as that for the httpd.conf file.
This section describes how to create weblogic.conf files, and includes sample weblogic.conf
files.
If you are using SSL between the Apache HTTP Server Plug-In and WebLogic Server, you
cannot define parameters in a file accessed, as the weblogic.conf file is, via the Apache
Include directive.
Enter each parameter on a new line. Do not put = between a parameter and its value. For
example:
PARAM_1 value1
PARAM_2 value2
PARAM_3 value3
If you define the CookieName parameter, you must define it in an IfModule block.
If you use an Apache HTTP Server <VirtualHost> block, you must include all
configuration parameters (MatchExpression, for example) for the virtual host within the
<VirtualHost> block (see Apache Virtual Host documentation).
If you want to have only one log file for all the virtual hosts configured in your
environment, you can achieve it using global properties. Instead of specifying the same
Debug, WLLogFile and WLTempDir properties in each virtual host you can specify them
just once in the <IfModule> tag
3-9
<IfModule mod_weblogic.c>
WebLogicClusteragarwalp02:8005,agarwalp02:8006
Debug
ON
WLLogFile
c:/tmp/global_proxy.log
WLTempDir
"c:/myTemp"
DebugConfigInfo
On
KeepAliveEnabled ON
KeepAliveSecs
15
</IfModule>
<Location /jurl>
SetHandler weblogic-handler
WebLogicCluster agarwalp01:7001
</Location>
<Location /web>
SetHandler weblogic-handler
PathTrim
/web
Debug
OFF
WLLogFile
c:/tmp/web_log.log
</Location>
<Location /foo>
SetHandler weblogic-handler
PathTrim
/foo
Debug
ERR
WLLogFile
c:/tmp/foo_proxy.log
</Location>
3-10
All the requests which match /jurl/* will have Debug Level set to ALL and log messages
will be logged to c:/tmp/global_proxy.log file. All the requests which match /web/* will
have Debug Level set to OFF and no log messages will be logged. All the requests which
match /foo/* will have Debug Level set to ERR and log messages will be logged to
c:/tmp/foo_proxy.log file
BEA recommends that you use the MatchExpression statement instead of the <files>
block.
The first MatchExpression parameter below specifies the filename pattern *.jsp, and then
names the single WebLogicHost. The paramName=value combinations following the pipe
symbol specify the port at which WebLogic Server is listening for connection requests, and also
activate the Debug option. The second MatchExpression specifies the filename pattern *.http
3-11
and identifies the WebLogicCluster hosts and their ports. The paramName=value combination
following the pipe symbol specifies the error page for the cluster.
# These parameters are common for all URLs which are
# directed to the current module. If you want to override
# these parameters for each URL, you can set them again in
# the <Location> or <Files> blocks (Except WebLogicHost,
# WebLogicPort, WebLogicCluster, and CookieName.)
<IfModule mod_weblogic.c>
MatchExpression *.jsp WebLogicHost=myHost|WebLogicPort=7001|Debug=ON
MatchExpression
*.html WebLogicCluster=myHost1:7282,myHost2:7283|ErrorPage=
http://www.xyz.com/error.html
</IfModule>
3-12
</IfModule>
</VirtualHost>
# VirtualHost2 = 127.0.0.2:80
<VirtualHost 127.0.0.2:80>
DocumentRoot "C:/test/VirtualHost1"
ServerName 127.0.0.2:80
<IfModule mod_weblogic.c>
#... WLS parameter ...
WebLogicCluster localhost:7101,localhost:7201
# Example: MatchExpression *.jsp <some additional parameter>
MatchExpression *.jsp PathPrepend=/test2
#... WLS parameter ...
</IfModule>
</VirtualHost><IfModule mod_weblogic.c>
You must define a unique value for 'ServerName'or some Plug-In parameters will not work as
expected.
libexec/mod_wl_20.so
<Location /weblogic>
SetHandler weblogic-handler
PathTrim /weblogic
ErrorPage http://myerrorpage1.mydomain.com
</Location>
<Location /servletimages>
SetHandler weblogic-handler
3-13
PathTrim /something
ErrorPage http://myerrorpage1.mydomain.com
</Location>
<IfModule mod_weblogic.c>
MatchExpression *.jsp
WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001
ErrorPage http://myerrorpage.mydomain.com
</IfModule>
Certificate Authority file from the DemoTrust.jks keystore file that resides in
BEA_HOME/weblogic92/server/lib.
a.
Change the alias name to obtain a different trusted CA file from the keystore.
To look at all of the keystore's trusted CA files, use:
keytool -list -keystore DemoTrust.jks
See Identity Assertion Providers in Developing Security Providers for WebLogic Server.
3-15
5. Set any additional parameters in the httpd.conf file that define information about the SSL
connection. For a complete list of the SSL parameters that you can configure for the plug-in,
see SSL Parameters for Web Server Plug-Ins on page 7-14.
To prepare the plugin configuration, double click the lock and go to the certificates path:
* Select the root CA (at the top)
* Display it
* Detail and then copy this certificate to a file using the Coded "Base
64 X509" option
* Save the file, for example, to MyWeblogicCAToTrust.cer (which is also a
PEM file)
The PathTrim parameter (see General Parameters for Web Server Plug-Ins on page 7-2)
must be configured inside the <Location> tag.
The following configuration is incorrect:
<Location /weblogic>
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicHost localhost
WebLogicPort 7001
PathTrim /weblogic
</IfModule>
The Include directive does not work with Apache SSL. You must configure all
parameters directly in the httpd.conf file. Do not use the following configuration when
using SSL:
<IfModule mod_weblogic.c>
MatchExpression *.jsp
3-16
Include weblogic.conf
</IfModule>
z
The current implementation of the WebLogic Server Apache Plug-In does not support the
use of multiple certificate files with Apache SSL.
Network problems
Failure of all WebLogic Server instances to respond could indicate the following problems:
z
A hung server
A database problem
An application-specific failure
3-17
On Apache 2.0.x, set the KeepAlive directive in the httpd.conf file to On. For example:
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
Decrease the time wait interval. This setting varies according to the operating system you
are using. For example:
On Windows NT, set the TcpTimedWaitDelay on the proxy and WebLogic Server
servers to a lower value. Set the TIME_WAIT interval in Windows NT by editing the
registry key under HKEY_LOCAL_MACHINE:
SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay
If this key does not exist you can create it as a DWORD value. The numeric value is
the number of seconds to wait and may be set to any value between 30 and 240. If not
set, Windows NT defaults to 240 seconds for TIME_WAIT.
On Windows 2000, lower the value of the TcpTimedWaitDelay by editing the registry
key under HKEY_LOCAL_MACHINE:
SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
On Solaris, reduce the setting tcp_time_wait_interval to one second (for both the
WebLogic Server machine and the Apache machine, if possible):
$ndd /dev/tcp
param name to set - tcp_time_wait_interval
value=1000
z
Increase the open file descriptor limit on your machine. This limit varies by operating
system. Using the limit (.csh) or ulimit (.sh) directives, you can make a script to
increase the limit. For example:
#!/bin/sh
ulimit -S -n 100
exec httpd
3-18
On Solaris, increase the values of the following tunables on the WebLogic Server machine:
Using Web Server Plug-Ins With WebLogic Server
tcp_conn_req_max_q
tcp_conn_req_max_q0
3-19
3-20
CHAPTER
The following sections describe how to install and configure the Microsoft Internet Information
Server Plug-In.
z
Installing and Configuring the Microsoft Internet Information Server Plug-In on page 4-3
Proxying Requests from Multiple Virtual Websites to WebLogic Server on page 4-9
Using SSL with the Microsoft Internet Information Server Plug-In on page 4-13
4-1
Proxying Requests
The plug-in proxies requests to WebLogic Server based on a configuration that you specify. You
can proxy requests based on either the URL of the request or a portion of the URL. This is called
proxying by path.
You can also proxy a request based on the MIME type of the requested file, which called proxying
by file extension.
You can also enable both methods. If you do enable both methoda and a request matches both
criteria, the request is proxied by path.
4-2
Certific ations
You can also specify additional parameters for each of these types of requests that define
additional behavior of the plug-in. For more information, see Installing and Configuring the
Microsoft Internet Information Server Plug-In on page 4-3.
Certifications
For the latest information on operating system and IIS version compatibility with the Microsoft
Internet Information Server Plug-In, see the platform support page in Supported Configurations
for WebLogic Platform 9.2.
4-3
e. In the Properties panel, select the Home Directory tab, and click the Configuration button
in the Applications Settings section.
4-4
f. On the Mappings tab, click the Add button to add file types and configure them to be
proxied to WebLogic Server.
4-5
4-6
http://mywebLogic:7001/jspfiles/myfile.jsp
Note: To avoid out-of-process errors, do not deselect the "Cache ISAPI Applications"
check box.
3. If you want to configure proxying by path complete this step. (In addition to proxying by file
type, you can configure the Microsoft Internet Information Server Plug-In to serve files based
on their path by specifying some additional parameters in the iisproxy.ini file.) Proxying
by path takes precedence over proxying by MIME type.
You can also proxy multiple websites defined in IIS by path. For more information, see
Proxying Requests from Multiple Virtual Websites to WebLogic Server on page 4-9.
To configure proxying by path:
a. Start the Internet Information Service Manager by selecting it from the Start menu.
b. Place the iisforward.dll file in the same directory as the iisproxy.dll file and add
the iisforward.dll file as a filter service in IIS (WebSite Properties ISAPI Filters
tab Add the iisforward dll). Set the user permissions for the iisforward.dll file to
include the name of the user who will be running IIS. One way to do this is by right
clicking on the iisproxy.dll file and selecting Permissions, then adding the username of the
person who will be running IIS.
c. Register .wlforward as a special file type to be handled by iisproxy.dll in IIS.
d. Define the property WlForwardPath in iisproxy.ini. WlForwardPath defines the
path that is proxied to WebLogic Server, for example: WlForwardPath=/weblogic.
e. Set the PathTrim parameter to trim off the WlForwardPath when necessary. For
example, using
WlForwardPath=/weblogic
PathTrim=/weblogic
4-7
4-8
6. Optionally, enable HTTP tunneling by following the instructions for proxying by path (see
step 8 above), substituting the WebLogic Server host name and the WebLogic Server port
number, or the name of a WebLogic Cluster that you wish to handle HTTP tunneling requests.
a. If you are using weblogic.jar and the T3 protocol, set WlForwardPath to this URL
pattern:
WlForwardPath=*/HTTPClnt*
b. If you are using IIOP, which is the only protocol used by the WebLogic Server thin client,
wlclient.jar, set the value of WlForwardPath to */iiop*:
WlForwardPath=*/iiop*
4-9
4. Create a file called iisforward.ini. Place this file in the same directory that contains
iisforward.dll. This file should contain the following entry for each virtual website
defined in IIS:
vhostN=websiteName:port
websiteName:port=dll_directory/iisproxy.ini
Where:
N is an integer representing the virtual website. The first virtual website you define
should use the integer 1 and each subsequent website should increment this number by
1.
websiteName is the name of the virtual website as registered with IIS.
port is the port number where IIS listens for HTTP requests.
dll_directory is the path to the directory you created in step 1.
For example:
vhost1=strawberry.com:7001
strawberry.com:7001=c:\strawberry\iisproxy.ini
vhost2=blueberry.com:7001
blueberry.com:7001=c:\blueberry\iisproxy.ini
...
5. Create an iisproxy.ini file for the virtual eebsites, as described in step 4 in Proxying
Requests. Copy this iispoxy.ini file to the directory you created in step 1.
6. Copy iisproxy.dll to the directory you created in step 1.
7. In IIS, set the value for the Application Protection option to high (isolated). If the Application
Protection option is set to Medium(pooled), the iisproxy.dll that registered as the first website
will always be invoked. In this event, all the requests will be proxied to the same WebLogic
Server instances defined in the iisproxy.ini of the first website.
4-10
C re at i n g A C L s T hr o u gh I I S
ConnectTimeoutSecs=20
ConnectRetrySecs=2
Here is a sample iisproxy.ini file with clustered WebLogic Servers. Comment lines are
denoted with the # character.
# This file contains initialization name/value pairs
# for the IIS/WebLogic plug-in.
WebLogicCluster=myweblogic.com:7001,yourweblogic.com:7001
ConnectTimeoutSecs=20
ConnectRetrySecs=2
Note: If you are using SSL between the plug-in and WebLogic Server, the port number should
be defined as the SSL listen port.
If the user does not have local logon rights, Basic Authentication does not work even if the
FrontPage, IIS, and Windows NT configurations appear to be correct.
A user who has local log-on rights and who can obtain physical access to the host
computer running IIS will be permitted to start an interactive session at the console.
To enable Basic Authentication, in the Directory Security tab of the console, ensure that the
Allow Anonymous option is on and all other options are off.
4-11
application through the Microsoft Internet Information Server Plug-In. Create an Identity
Assertion Provider that will safely secure your Plug-In as follows:
1. Create a custom Identity Assertion Provider on your WebLogic Server application. See How
to Develop a Custom Identity Assertion Provider in Developing Security Providers for
WebLogic Server.
2. Configure the custom Identity Assertion Provider to support the "Cert" token type and make
it the active token type. See How to Create New Token Types in Developing Security
Providers for WebLogic Server.
3. Set the clientCertProxy attribute to True in the web.xml deployment descriptor file for the
Web application (or, if using a cluster, optionally set the Client Cert Proxy Enabled
attribute to true for the whole cluster on the Administration Console
Cluster-->Configuration-->General tab). See context-param in Developing Web Applications
for WebLogic Server.
4. Once you have set clientCertProxy, be sure to use a connection filter to ensure that
WebLogic Server accepts connections only from the machine on which the Microsoft Internet
Information Server Plug-In is running. See Using Network Connection Filters in
Programming WebLogic Security.
5. Web server plug-ins require a trusted Certificate Authority file in order to use SSL between
the plug-in and WebLogic Server. Use Sun Microsystems' keytool utility to export a trusted
Certificate Authority file from the DemoTrust.jks keystore file that resides in
BEA_HOME/weblogic92/server/lib.
a.
Change the alias name to obtain a different trusted CA file from the keystore.
To look at all of the keystore's trusted CA files, use:
keytool -list -keystore DemoTrust.jks
See Identity Assertion Providers in Developing Security Providers for WebLogic Server for more
information about Identity Assertion Providers.
4-12
Usi ng SSL w ith the Microso ft Inte rn et In f orma ti on Se rve r Plu g-I n
4-13
To proxy servlets if iisforward.dll is not registered as a filter, you must configure servlet
proxying by file type.To proxy servlets by file type:
1. Register an arbitrary file type (extension) with IIS to proxy the request to the WebLogic
Server, as described in step 2 under Installing and Configuring the Microsoft Internet
Information Server Plug-In on page 4-3.
2. Register your servlet in the appropriate Web Application. For more information on registering
servlets, see Configuring Servlets.
3. Invoke your servlet with a URL formed according to this pattern:
http://www.myserver.com/virtualName/anyfile.ext
4-14
4-15
4-16
4-17
4-18
CHAPTER
The following sections describe how to install and configure the Netscape Enterprise Server
(NES) proxy plug-in:
z
Installing and Configuring the Netscape Enterprise Server Plug-In on page 5-3
Failover Behavior When Using Firewalls and Load Directors on page 5-16
5-1
process, possibly on a different machine) is delegated to serve dynamic pages, such as JSPs or
pages generated by HTTP Servlets. The connection between WebLogic Server and the Netscape
Enterprise Server Plug-In is made using clear text or Secure Sockets Layer (SSL). To the end
userthe browserthe HTTP requests delegated to WebLogic Server appear to come from the
same source as the static pages. Additionally, the HTTP-tunneling facility of WebLogic Server
can operate through the Netscape Enterprise Server Plug-In, providing access to all WebLogic
Server services (not just dynamic pages).
The Netscape Enterprise Server Plug-In operates as an NES module (see
http://home.netscape.com/servers/index.html) within a Netscape Enterprise Server.
The NES module is loaded by NES at startup, and then certain HTTP requests are delegated to it.
NES is similar to an HTTP (Java) servlet, except that an NES module is written in code native to
the platform.
For more information on supported versions of Netscape Enterprise Server and iPlanet servers,
see the BEA WebLogic Server Certifications Page.
Proxying Requests
The plug-in proxies requests to WebLogic Server based on a configuration that you specify. You
can proxy requests based on the URL of the request (or a portion of the URL). This is called
proxying by path. You can also proxy request based on the MIME type of the requested file. Or
you can use a combination of both methods. If a request matches both criteria, the request is
proxied by path. You can also specify additional parameters for each of these types of requests
that define additional behavior of the plug-in. For more information, see Installing and
Configuring the Netscape Enterprise Server Plug-In on page 5-3.
5-2
Where NETSCAPE_HOME is the root directory of the NES installation, and INSTANCE_NAME
is the particular instance or server configuration that you are using. For example, on a
UNIX machine called myunixmachine, the obj.conf file would be found here:
/usr/local/netscape/enterprise-351/
https-myunixmachine/config/obj.conf
4. Instruct NES to load the native library (the .so or .dll file) as an NES module.
To use iPlanet 4.x or earlier, add the following lines to the beginning of the obj.conf file.
Init fn="load-modules" funcs="wl_proxy,wl_init"\
shlib=/usr/local/netscape/plugins/SHARED_LIBRARY
Init fn="wl_init"
Where SHARED_LIBRARY is the shared object or dll (for example libproxy.so) that you
installed in step 1 under Installing and Configuring the Netscape Enterprise Server
Plug-In on page 5-3. The function load-modules tags the shared library for loading
5-3
when NES starts up. The values wl_proxy and wl_init identify the functions that the
Netscape Enterprise Server Plug-In executes.
To use iPlanet 6.0, add the following lines to the beginning of the magnus.conf file.
These lines instruct NES to load the native library (the .so or .dll file) as an NES
module:
Init fn="load-modules" funcs="wl_proxy,wl_init"\
shlib=/usr/local/netscape/plugins/SHARED_LIBRARY
Init fn="wl_init"
Where SHARED_LIBRARY is the shared object or dll (for example libproxy.so) that you
installed in step 1 under Installing and Configuring the Netscape Enterprise Server
Plug-In on page 5-3. The function load-modules tags the shared library for loading
when NES starts up. The values wl_proxy and wl_init identify the functions that the
Netscape Enterprise Server Plug-In executes.
5. If you want to proxy requests by URL, (also called proxying by path.) create a separate
<Object> tag for each URL that you want to proxy and define the PathTrim parameter. (You
can proxy requests by MIME type, in addition to or instead of proxying requests by path. See
step 6 Proxying by path supersedes proxying by MIME type.) The following is an example
of an <Object> tag that proxies a request containing the string */weblogic/*.
<Object name="weblogic" ppath="*/weblogic/*">
Service fn=wl_proxy WebLogicHost=myserver.com\
WebLogicPort=7001 PathTrim="/weblogic"
</Object>
b. Specify the URL to be proxied within the <Object> tag, using the ppath attribute. For
example:
<Object name=myObject ppath="*/weblogic/*>
The value of the ppath attribute can be any string that identifies requests intended for
Weblogic Server. When you use a ppath, every request that contains that path is
redirected. For example, a ppath of */weblogic/* redirects every request that
begins http://enterprise.com/weblogic to the Netscape Enterprise Server
Plug-In, which sends the request to the specified Weblogic host or cluster.
5-4
c. Add the Service directive within the <Object> and </Object> tags. In the Service
directive you can specify any valid parameters as name=value pairs. Separate multiple
name=value pairs with one and only one space. For example:
Service fn=wl_proxy WebLogicHost=myserver.com\
WebLogicPort=7001 PathTrim="/weblogic"
For a complete list of parameters, see General Parameters for Web Server Plug-Ins
on page 7-2. You must specify the following parameters:
For a non-clustered WebLogic Server:
The WebLogicHost and WebLogicPort parameters.
For a cluster of WebLogic Server instances:
The WebLogicCluster parameter.
Always begin the Service directive with Service fn=wl_proxy, followed by valid
name=value pairs of parameters.
Here is an example of the object definitions for two separate ppaths that identify
requests to be sent to different instances of WebLogic Server:
<Object name="weblogic" ppath="*/weblogic/*">
Service fn=wl_proxy WebLogicHost=myserver.com\
WebLogicPort=7001 PathTrim="/weblogic"
</Object>
<Object name="si" ppath="*/servletimages/*">
Service fn=wl_proxy WebLogicHost=otherserver.com\
WebLogicPort=7008
</Object>
Note: Parameters that are not required, such as PathTrim, can be used to further configure the
way the ppath is passed through the Netscape Enterprise Server Plug-In. For a complete
list of plug-in parameters, see General Parameters for Web Server Plug-Ins on
page 7-2.
6. If you are proxying requests by MIME type, add any new MIME types referenced in the
obj.conf file to the MIME.types file. You can add MIME types by using the Netscape server
console or by editing the MIME.types file directly.
To directly edit the MIME.types file, open the file for edit and type the following line:
type=text/jsp
exts=jsp
Note: For NES 4.0 (iPlanet), instead of adding the MIME type for JSPs, change the existing
MIME type from
magnus-internal/jsp
5-5
to
text/jsp.
To use the Netscape console, select Manage PreferencesMime Types, and make the
additions or edits.
7. All requests with a designated MIME type extension (for example, .jsp) can be proxied to
the WebLogic Server, regardless of the URL. To proxy all requests of a certain file type to
WebLogic Server:
a. Add a Service directive to the existing default Object definition. (<Object
name=default ...>)
For example, to proxy all JSPs to a WebLogic Server, the following Service directive
should be added after the last line that begins with:
NameTrans fn=....
This Service directive proxies all files with the .jsp extension to the designated
WebLogic Server, where they are served with a URL like this:
http://WebLogic:7001/jspfiles/myfile.jsp
The value of the PathPrepend parameter should correspond to the context root of a
Web Application that is deployed on the WebLogic Server or cluster to which requests
are proxied.
After adding entries for the Netscape Enterprise Server Plug-In, the default Object
definition will be similar to the following example:
<Object name=default>
NameTrans fn=pfx2dir from=/ns-icons\
dir="c:/Netscape/SuiteSpot/ns-icons"
NameTrans fn=pfx2dir from=/mc-icons\
dir="c:/Netscape/SuiteSpot/ns-icons"
NameTrans fn="pfx2dir" from="/help" dir=\
"c:/Netscape/SuiteSpot/manual/https/ug"
NameTrans fn=document-root root="c:/Netscape/SuiteSpot/docs"
Service method="(GET|HEAD|POST|PUT)" type=text/jsp\
fn=wl_proxy WebLogicHost=localhost WebLogicPort=7001\
PathPrepend=/jspfiles
PathCheck fn=nt-uri-clean
5-6
fn=imagemap
b. Add a similar Service statement to the default object definition for all other MIME types
that you want to proxy to WebLogic Server.
c. To configure proxy-by-MIME for the JSP, you must add the following entry to the
mime.types file
type=text/jsp exts=jsp
For proxy-by-MIME to work properly you need to disable JAVA from the Sun One Web
Server otherwise SUN One will try to serve all requests that end in *.jsp and will return a
404 error as it will fail to locate the resource under $doc_root.
To disable JAVA from the Sun One Web Server, comment out the following in the
obj.conf file under the name="default"#NameTrans fn="ntrans-j2ee" name="j2ee"
and restart the webserver.
8. Optionally, if you are proxying by path, enable HTTP-tunneling:
a. If you are using weblogic.jar and tunneling the t3 protocol, add the following object
definition to the obj.conf file, substituting the WebLogic Server host name and the
WebLogic Server port number, or the name of a WebLogic Cluster that you wish to handle
HTTP tunneling requests.
<Object name="tunnel" ppath="*/HTTPClnt*">
Service fn=wl_proxy WebLogicHost=192.192.1.4\
</Object>
WebLogicPort=7001
b. If you are tunneling IIOP, which is the only protocol used by the WebLogic Server thin
client, wlclient.jar, add the following object definition to the obj.conf file,
substituting the WebLogic Server host name and the WebLogic Server port number, or
the name of a WebLogic Cluster that you wish to handle HTTP tunneling requests.
5-7
WebLogicPort=7001
For information on how to create a default Web Application, see Developing Web
Applications, Servlets and JSPs for WebLogic Server.
5-8
Eliminate extraneous leading and trailing white space. Extra white space can cause your
Netscape server to fail.
If you must enter more characters than you can fit on one line, place a backslash (\) at the
end of that line and continue typing on the following line. The backslash directly appends
the end of the first line to the beginning of the following line. If a space is necessary
between the words that end the first line and begin the second line, be certain to use one
space, either at the end of the first line (before the backslash), or at the beginning of the
second line.
Do not split attributes across multiple lines. (For example, all servers in a cluster must be
listed in the same line, following WebLogicCluster.)
---------
# (no cluster)
# The following line locates the NES library for loading at
# startup, and identifies which functions within the library are
# NES functions. Verify the path to the library (the value
# of the shlib=<...> parameter) and that the file is
# readable, or the server fails to start.
Init fn="load-modules" funcs="wl_proxy,wl_init"\
shlib=/usr/local/netscape/plugins/libproxy.so
Init fn="wl_init"
# Configure which types of HTTP requests should be handled by the
# NES module (and, in turn, by WebLogic).
This is done
5-9
exts=jsp
#
# This configuration means that any file with the extension
# ".jsp" are proxied to WebLogic. Then you must add the
# Service line for this extension to the Object "default",
# which should already exist in your obj.conf file:
<Object name=default>
NameTrans fn=pfx2dir from=/ns-icons\
dir="c:/Netscape/SuiteSpot/ns-icons"
NameTrans fn=pfx2dir from=/mc-icons\
dir="c:/Netscape/SuiteSpot/ns-icons"
NameTrans fn="pfx2dir" from="/help" dir=\
"c:/Netscape/SuiteSpot/manual/https/ug"
NameTrans fn=document-root root="c:/Netscape/SuiteSpot/docs"
Service method="(GET|HEAD|POST|PUT)" type=text/jsp fn=wl_proxy\
WebLogicHost=localhost WebLogicPort=7001 PathPrepend=/jspfiles
PathCheck fn=nt-uri-clean
PathCheck fn="check-acl" acl="default"
PathCheck fn=find-pathinfo
PathCheck fn=find-index index-names="index.html,home.html"
ObjectType fn=type-by-extension
ObjectType fn=force-type type=text/plain
Service method=(GET|HEAD) type=magnus-internal/imagemap\
fn=imagemap
Service method=(GET|HEAD) \
type=magnus-internal/directory fn=index-common
Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-file
AddLog fn=flex-log name="access"
</Object>
# The following directive enables HTTP-tunneling of the
# WebLogic protocol through the NES plug-in.
5-10
This is done
5-11
theirweblogic.com:7001" PathTrim="/weblogic"
</Object>
# Here we configure the plug-in so that requests that
# match "/servletimages/" are handled by the
# plug-in/WebLogic.
<Object name="si" ppath="*/servletimages/*">
Service fn=wl_proxy \
WebLogicCluster="myweblogic.com:7001,yourweblogic.com:7001,\
theirweblogic.com:7001"
</Object>
# This Object directive works by file extension rather than
# request path. To use this configuration, you must also add
# a line to the mime.types file:
#
# type=text/jsp
exts=jsp
#
# This configuration means that any file with the extension
# ".jsp" is proxied to WebLogic. Then you must add the
# Service line for this extension to the Object "default",
# which should already exist in your obj.conf file:
<Object name=default>
NameTrans fn=pfx2dir from=/ns-icons\
dir="c:/Netscape/SuiteSpot/ns-icons"
NameTrans fn=pfx2dir from=/mc-icons\
dir="c:/Netscape/SuiteSpot/ns-icons"
NameTrans fn="pfx2dir" from="/help" dir=\
"c:/Netscape/SuiteSpot/manual/https/ug"
NameTrans fn=document-root root="c:/Netscape/SuiteSpot/docs"
Service method="(GET|HEAD|POST|PUT)" type=text/jsp fn=wl_proxy\
WebLogicCluster="myweblogic.com:7001,yourweblogic.com:7001,\
theirweblogic.com:7001",PathPrepend=/jspfiles
PathCheck fn=nt-uri-clean
PathCheck fn="check-acl" acl="default"
PathCheck fn=find-pathinfo
PathCheck fn=find-index index-names="index.html,home.html"
ObjectType fn=type-by-extension
5-12
Se tt i n g U p P e r i m e t e r Au th e n ti c at i o n
fn=imagemap
type=magnus-internal/directory fn=index-common
Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-file
AddLog fn=flex-log name="access"
</Object>
# The following directive enables HTTP-tunneling of the
# WebLogic protocol through the NES plug-in.
<Object name="tunnel" ppath="*/HTTPClnt*">
Service fn=wl_proxy WebLogicCluster="myweblogic.com:7001,\
yourweblogic.com:7001,theirweblogic.com:7001"
</Object>
#
## ------------- END SAMPLE OBJ.CONF CONFIGURATION ---------
5-13
4. Once you have set clientCertProxy, be sure to use a connection filter to ensure that
WebLogic Server accepts connections only from the machine on which the Netscape
Enterprise Server Plug-In is running. See Using Network Connection Filters in Programming
WebLogic Security.
5. Web server plug-ins require a trusted Certificate Authority file in order to use SSL between
the plug-in and WebLogic Server. Use Sun Microsystems' keytool utility to export a trusted
Certificate Authority file from the DemoTrust.jks keystore file that resides in
BEA_HOME/weblogic92/server/lib.
a. To extract the wlsdemoca file, for example, use the command:
keytool -export -file trustedcafile.der -keystore DemoTrust.jks -alias
wlsdemoca
Change the alias name to obtain a different trusted CA file from the keystore.
To look at all of the keystore's trusted CA files, use:
keytool -list -keystore DemoTrust.jks
5-14
2. Configure the WebLogic Server SSL listen port. For more information, see Configuring the
SSL Protocol.
3. Set the WebLogicPort parameter in the Service directive in the obj.conf file to the listen
port configured in step 2
4. Set the SecureProxy parameter in the Service directive in the obj.conf file file to ON.
5. Set additional parameters in the Service directive in the obj.conf file that define
information about the SSL connection. For a complete list of parameters, see SSL
Parameters for Web Server Plug-Ins on page 7-14.
5-15
first request is routed to one of these servers, a dynamic server list is returned containing an
updated list of servers in the cluster. The updated list adds any new servers in the cluster and
deletes any that are no longer part of the cluster or that have failed to respond to requests. This
list is updated automatically with the HTTP response when a change in the cluster occurs.
5-16
5-17
5-18
CHAPTER
The following sections discuss how to proxy HTTP requests to another Web server:
z
6-1
1. Register the proxy servlet in your Web Application deployment descriptor (see Sample
web.xml for Use with ProxyServlet on page 6-3). The Web Application must be the default
Web Application of the server instance that is responding to requests. The class name for the
proxy servlet is weblogic.servlet.proxy.HttpProxyServlet. For more information,
see Developing Web Applications, Servlets, and JSPs for WebLogic Server.
2. Define an initialization parameter for the ProxyServlet with a <param-name> of
redirectURL and a <param-value> containing the URL of the server to which proxied
requests should be directed.
3. Optionally, define the following <KeyStore> initialization parameters to use two-way SSL
with your own identity certificate and key. If no <KeyStore> is specified in the deployment
descriptor, the proxy will assume one-way SSL.
<KeyStore> The key store location in your Web application.
<KeyStoreType> The key store type. If it is not defined, the default type will be
used instead.
<PrivateKeyAlias> The private key alias.
<KeyStorePasswordProperties> A property file in your Web application that
defines encrypted passwords to access the key store and private key alias. The file
contents looks like this:
KeyStorePassword={3DES}i4+50LCKenQO8BBvlsXTrg\=\=
PrivateKeyPassword={3DES}a4TcG4mtVVBRKtZwH3p7yA\=\=
6-2
6-3
</servlet>
<servlet-mapping>
<servlet-name>ProxyServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ProxyServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ProxyServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ProxyServlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
</web-app>
6-4
CHAPTER
The following sections describe the parameters that you use to configure the Apache, Netscape,
and Microsoft IIS Web server plug-ins:
z
Installing and Configuring the Apache HTTP Server Plug-In on page 3-1
Installing and Configuring the Netscape Enterprise Server Plug-In on page 5-1
7-1
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
WebLogicHost
none
none
7-2
G e n e r al Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
WebLogicCluster
none
If you are using SSL between the plug-in and WebLogic Server,
set the port number to the SSL listen port (see Configuring the
SSL Protocol) and set the SecureProxy parameter to ON.
The plug-in 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 plug-in
maintain. WebLogic Server and the plug-in 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 setting the
DynamicServerList parameter to OFF
The plug-in 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.
7-3
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
PathTrim
null
null
10
7-4
G e n e r al Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
ConnectRetrySecs
7-5
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
Debug
OFF
7-6
G e n e r al Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
WLLogFile
See the
Debug
parameter
Specifies 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.
WLDNSRefreshInterval
0 (Lookup
once,
during
startup)
See the
Debug
parameter
WLTempDir
OFF
7-7
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
StatPath
false
If the file does not exist, an HTTP 404 File Not Found
response is returned to the client. If the file exists but is not
world-readable, an HTTP 403/Forbidden response is
returned to the client. In either case, the default mechanism for
the Web server to handle these responses fulfills the body of the
response. This option is useful if both the WebLogic Server Web
Application and the Web Server have the same document root.
You can customize the error response by using the ErrorPage
parameter.
ErrorPage
none
You can create your own error page that is redirected to, when
your Web server is unable to forward requests to WebLogic
Server.
The plug-in redirects to an error page when the back-end server
returns an HTTP 503/Service Unavailable response and there
are no servers for failover.
WLSocketTimeoutSecs
2 (must
be
greater
than 0)
WLIOTimeoutSecs (new
name for
HungServerRecoverSecs)
300
7-8
G e n e r al Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
Idempotent
ON
CookieName
JSESSIO
NID
DefaultFileName
none
7-9
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
MaxPostSize
-1
MatchExpression
none
7-10
G e n e r al Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
FileCaching
ON
When set to ON, and the size of the POST data in a request is
greater than 2048 bytes, the POST data is first read into a
temporary file on disk and then forwarded to the WebLogic
Server in chunks of 8192 bytes. This preserves the POST data
during failover, allowing all necessary data to be repeated to the
secondary if the primary goes down.
Note that when FileCaching is ON, any client that tracks the
progress of the POST will see that the transfer has completed
even though the data is still being transferred between the
WebServer and WebLogic. So, if you want the progress bar
displayed by a browser during the upload to reflect when the
data is actually available on the WebLogic Server, you might not
want to have FileCaching ON.
When set to OFF and the size of the POST data in a request is
greater than 2048 bytes, the reading of the POST data is
postponed until a WebLogic Server cluster member is identified
to serve the request. Then the Plugin reads and immediately
sends the POST data to the WebLogic Server in chunks of 8192
bytes.
Note that turning FileCaching OFF limits failover. If the
WebLogic Server primary server goes down while processing
the request, the POST data already sent to the primary cannot be
repeated to the secondary.
Finally, regardless of how FileCaching is set, if the size of the
POST data is 2048 bytes or less the plugin will read the data into
memory and use it if needed during failover to repeat to the
secondary.
FilterPriorityLevel
7-11
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
WLExcludePathOrMimeTyp
e
none
WlForwardPath
null
KeepAliveSecs
20
KeepAliveEnabled
true
(Netscape
and
Microsoft
IIS
plug-ins)
ON
(Apache
plug-in)
7-12
G e n e r al Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
QueryFromRequest
OFF
10
DynamicServerList
ON
When set to OFF, the plug-in ignores the dynamic cluster list
used for load balancing requests proxied from the plug-in and
only uses the static list specified with the WebLogicCluster
parameter. Normally this parameter should remain set to ON.
There are some implications for setting this parameter to OFF:
If one or more servers in the static list fails, the plug-in could
waste time trying to connect to a dead server, resulting in
decreased performance.
7-13
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
WLProxySSL
OFF
WLLocalIP
WLSendHdrSeparately
ON
7-14
S SL Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
7-15
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
EnforceBasicConstra
ints
Strong
7-16
S SL Pa ra m e t e r s f o r We b Ser v e r P l u g- I n s
Default
Description
SecureProxy
OFF
Set this parameter to ON to enable the use of the SSL protocol for all
communication between the plug-in and WebLogic Server.
Remember to configure a port on the corresponding WebLogic Server
for the SSL protocol before defining this parameter.
This parameter may be set at two levels: in the configuration for the
main server andif you have defined any virtual hostsin the
configuration for the virtual host. The configuration for the virtual
host inherits the SSL configuration from the configuration of the main
server if the setting is not overridden in the configuration for the
virtual host.
TrustedCAFile
none
Name of the file that contains the digital certificates for the trusted
certificate authorities for the plug-in. This parameter is required if the
SecureProxy parameter is set to ON.
The filename must include the full directory path of the file.
RequireSSLHostMatch
true
7-17
Pa ra m e t e r s f o r W eb Ser v e r P l u g- I n s
Default
Description
SSLHostMatchOID
22
The ASN.1 Object ID (OID) that identifies which field in the Subject
Distinguished Name of the peer digital certificate is to be used to
perform the host match comparison. The default for this parameter
corresponds to the CommonName field of the Subject Distinguished
Name. Common OID values are:
Sur Name23
Common Name22
Email13
Organizational Unit30
Organization29
Locality26
KeyStore
none
KeyStoreType
none
The key store type when using two-way SSL with a generic
proxy servlet. If it is not defined, the default type will be used
instead.
PrivateKeyAlias
none
The private key alias when using two-way SSL with a generic
proxy servlet.
KeyStorePasswordPro
perties
none
7-18