13.7.3. Configure NSAPI as a Basic HTTP Connector
This task configures the NSAPI connector to redirect client requests to JBoss Enterprise Application Platform 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 13.7.4, “Configure NSAPI as a Load-balancing Cluster” instead.
- You must complete Section 13.7.2, “Configure the NSAPI Connector on Oracle Solaris” before continuing with the current task.
Procedure 13.16. Task
Define the URL paths to redirect to the JBoss Enterprise Application Platform servers.Edit the
IPLANET_CONFIG/obj.conffile. 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 string
jknsapirefers to the HTTP connector which will be defined in the next step. The example shows the use of wild-cards 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 the
IPLANET_CONFIG/obj.conffile. Add the following directly after the closing tag of the section you have just finished editing:
<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
/statusto the worker called
worker01, and all URL paths beneath
/nc/to the worker called
worker02. The third line indicates that all URLs assigned to the
jknsapiobject which are not matched by the previous lines are served to
worker01.Save and exit the file.
Define the workers and their attributes.Create a file called
directory. Paste the following contents into the file, and modify them to suit your environment.
# 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=ajp13The
workers.propertiesfile uses the same syntax as Apache mod_jk. For information about which options are available, refer to Section 13.4.4, “Configuration Reference for Apache Mod_jk Workers”.Save and exit the file.
Restart the iPlanet Web Server.Choose one of the following procedures, depending on whether you run iPlanet Web Server 6.1 or 7.0.
iPlanet Web Server 6.1
iPlanet Web Server 7.0
iPlanet Web Server now sends client requests to the URLs you have configured to deployments on the JBoss Enterprise Application Platform.