此内容没有您所选择的语言版本。
17.10. Oracle NSAPI Connector
17.10.1. About the Netscape Server API (NSAPI) 复制链接链接已复制到粘贴板!
nsapi_redirector.so
provided by JBoss EAP 6 in Native utilities
packages. To configure this connector, refer to Section 17.10.4, “Configure the NSAPI Connector to Balance Client Requests Across Multiple JBoss EAP 6 Servers”.
17.10.2. Configure the NSAPI Connector on Oracle Solaris 复制链接链接已复制到粘贴板!
The NSAPI connector is a module that runs within Oracle iPlanet Web Server.
Prerequisites
- Your server is running Oracle Solaris 10 or greater, on either an Intel 32-bit, an Intel 64-bit, or a SPARC64 architecture.
- Oracle iPlanet Web Server 7.0.15 or later for Intel architectures, or 7.0.14 or later for SPARC architectures, is installed and configured, aside from the NSAPI connector.
- JBoss EAP 6 is installed and configured on each server which will serve as a worker. Refer to Section 17.4.8, “Configure JBoss EAP 6 to Accept Requests From External Web Servers”.
- The JBoss Native Components ZIP package is downloaded from the Customer Service Portal at https://access.redhat.com.
Procedure 17.25. Extract and Setup the NSAPI Connector
Extract the JBoss Native Components package.
The rest of this procedure assumes that the Native Components package is extracted to the EAP_HOME directory. For the rest of this procedure, the directory/opt/oracle/webserver7/config/
is referred to as IPLANET_CONFIG. If your Oracle iPlanet configuration directory is different, modify the procedure accordingly.Disable servlet mappings.
Open theIPLANET_CONFIG/default.web.xml
file and locate the section with the headingBuilt In Server Mappings
. Disable the mappings to the following three servlets, by wrapping them in XML comment characters (<!--
and-->
).- default
- invoker
- jsp
The following example configuration shows the disabled mappings.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Save and exit the file.Configure the iPlanet Web Server to load the NSAPI connector module.
Add the following lines to the end of theIPLANET_CONFIG/magnus.conf
file, modifying file paths to suit your configuration. These lines define the location of thensapi_redirector.so
module, as well as theworkers.properties
file, which lists the workers and their properties.Init fn="load-modules" funcs="jk_init,jk_service" shlib="EAP_HOME/modules/system/layers/base/native/lib/nsapi_redirector.so" shlib_flags="(global|now)" Init fn="jk_init" worker_file="IPLANET_CONFIG/connectors/workers.properties" log_level="info" log_file="IPLANET_CONFIG/connectors/nsapi.log" shm_file="IPLANET_CONFIG/connectors/tmp/jk_shm"
Init fn="load-modules" funcs="jk_init,jk_service" shlib="EAP_HOME/modules/system/layers/base/native/lib/nsapi_redirector.so" shlib_flags="(global|now)" Init fn="jk_init" worker_file="IPLANET_CONFIG/connectors/workers.properties" log_level="info" log_file="IPLANET_CONFIG/connectors/nsapi.log" shm_file="IPLANET_CONFIG/connectors/tmp/jk_shm"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The configuration above is for a 32-bit architecture. If you use 64-bit Solaris, change the stringlib/nsapi_redirector.so
tolib64/nsapi_redirector.so
.Save and exit the file.Configure the NSAPI connector.
You can configure the NSAPI connector for a basic configuration, with no load balancing, or a load-balancing configuration. Choose one of the following options, after which your configuration will be complete.
This task configures the NSAPI connector to redirect client requests to JBoss EAP 6 servers with no load-balancing or fail-over. The redirection is done on a per-deployment (and hence per-URL) basis. For a load-balancing configuration, refer to Section 17.10.4, “Configure the NSAPI Connector to Balance Client Requests Across Multiple JBoss EAP 6 Servers” instead.
Prerequisites
- You must complete Section 17.10.2, “Configure the NSAPI Connector on Oracle Solaris” before continuing with the current task.
Procedure 17.26. Setup the Basic HTTP Connector
Define the URL paths to redirect to the JBoss EAP 6 servers.
Note
InIPLANET_CONFIG/obj.conf
, spaces are not allowed at the beginning of a line, except when the line is a continuation of the previous line.Edit theIPLANET_CONFIG/obj.conf
file. Locate the section which starts with<Object name="default">
, and add each URL pattern to match, in the format shown by the example file below. The stringjknsapi
refers to the HTTP connector which will be defined in the next step. The example shows the use of wildcards for pattern matching.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the worker which serves each path.
Continue editing theIPLANET_CONFIG/obj.conf
file. Add the following directly after the closing tag of the section you have just finished editing:</Object>
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow The example above redirects requests to the URL path/status
to the worker calledworker01
, and all URL paths beneath/nc/
to the worker calledworker02
. The third line indicates that all URLs assigned to thejknsapi
object which are not matched by the previous lines are served toworker01
.Save and exit the file.Define the workers and their attributes.
Create a file calledworkers.properties
in the
directory. Paste the following contents into the file, and modify them to suit your environment.IPLANET_CONFIG
/connectors/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Theworkers.properties
file uses the same syntax as Apache mod_jk. For information about which options are available, refer to Section 17.7.5, “Configuration Reference for Apache mod_jk Workers”.Save and exit the file.Restart the iPlanet Web Server.
Issue the following command to restart the iPlanet Web Server.IPLANET_CONFIG/../bin/stopserv IPLANET_CONFIG/../bin/startserv
IPLANET_CONFIG/../bin/stopserv IPLANET_CONFIG/../bin/startserv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
iPlanet Web Server now sends client requests to the URLs you have configured to deployments on JBoss EAP 6.
This task configures the NSAPI connector to send client requests to JBoss EAP 6 servers in a load-balancing configuration. To use NSAPI connector as a simple HTTP connector with no load-balancing, see Section 17.10.3, “Configure the NSAPI Connector to Send Client Requests to JBoss EAP 6”.
Procedure 17.27. Configure the Connector for Load-Balancing
Define the URL paths to redirect to the JBoss EAP 6 servers.
Note
InIPLANET_CONFIG/obj.conf
, spaces are not allowed at the beginning of a line, except when the line is a continuation of the previous line.Edit theIPLANET_CONFIG/obj.conf
file. Locate the section which starts with<Object name="default">
, and add each URL pattern to match, in the format shown by the example file below. The stringjknsapi
refers to the HTTP connector which will be defined in the next step. The example shows the use of wildcards for pattern matching.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the worker that serves each path.
Continue editing theIPLANET_CONFIG/obj.conf
file. Directly after the closing tag for the section you modified in the previous step (</Object>
), add the following new section and modify it to your needs:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Thisjksnapi
object defines the worker nodes used to serve each path that was mapped to thename="jksnapi"
mapping in thedefault
object. Everything except for URLs matching/jkmanager/*
is redirected to the worker calledrouter
.Define the workers and their attributes.
Create a file calledworkers.properties
in
. Paste the following contents into the file, and modify them to suit your environment.IPLANET_CONFIG
/connector/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Theworkers.properties
file uses the same syntax as Apache mod_jk. For information about which options are available, see Section 17.7.5, “Configuration Reference for Apache mod_jk Workers”.Save and exit the file.Restart the iPlanet Web Server 7.0.
IPLANET_CONFIG/../bin/stopserv IPLANET_CONFIG/../bin/startserv
IPLANET_CONFIG/../bin/stopserv IPLANET_CONFIG/../bin/startserv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The iPlanet Web Server redirects the URL patterns you have configured to your JBoss EAP 6 servers in a load-balancing configuration.