16.9.3. Configure NSAPI as a Basic HTTP Connector
Overview
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 16.9.4, “Configure NSAPI as a Load-balancing Cluster” instead.
Prerequisites
- You must complete Section 16.9.2, “Configure the NSAPI Connector on Oracle Solaris” before continuing with the current task.
Procedure 16.18. 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.<Object name="default"> [...] NameTrans fn="assign-name" from="/status" name="jknsapi" NameTrans fn="assign-name" from="/images(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/css(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/nc(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/jmx-console(|/*)" name="jknsapi" </Object>
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>
.<Object name="jknsapi"> ObjectType fn=force-type type=text/plain Service fn="jk_service" worker="worker01" path="/status" Service fn="jk_service" worker="worker02" path="/nc(/*)" Service fn="jk_service" worker="worker01" </Object>
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/# An entry that lists all the workers defined worker.list=worker01, worker02 # Entries that define the host and port associated with these workers worker.worker01.host=127.0.0.1 worker.worker01.port=8009 worker.worker01.type=ajp13 worker.worker02.host=127.0.0.100 worker.worker02.port=8009 worker.worker02.type=ajp13
Theworkers.properties
file uses the same syntax as Apache mod_jk. For information about which options are available, refer to Section 16.6.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
Result
iPlanet Web Server now sends client requests to the URLs you have configured to deployments on JBoss EAP 6.