19.9.3. Configure NSAPI as a Basic HTTP Connector
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 19.9.4, “Configure NSAPI as a Load-balancing Cluster” instead.
- You must complete Section 19.9.2, “Configure the NSAPI Connector on Oracle Solaris” before continuing with the current task.
Procedure 19.21. Setup the Basic HTTP Connector
Define the URL paths to redirect to the JBoss EAP 6 servers.
IPLANET_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 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 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 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 19.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 Web Server now sends client requests to the URLs you have configured to deployments on JBoss EAP 6.