Chapter 9 Web Server Redirector Plug-In
This section describes how to install and configure the redirector plug-in on a Netscape 3.6 or an IPlanet 4.1 Web server. This process involves the following steps:
Your Web server installation includes an obj.conf file that contains configuration information used by the Web server. For your Web server to redirect HTTP requests to EAServer, the obj.conf file must include:
The redirector plug-in is a Netscape Server Application Programming Interface (NSAPI) extension named:
You must edit the obj.conf file to load and initialize the plug-in. You must also include the location of the redirector configuration file, which is used by the redirector to map incoming client requests to EAServer HTTP listeners.
WARNING! | Make a backup of the obj.conf file.When editing the obj.conf file, do not include any extra spaces, tabs, return characters, and so on. The Netscape Web server may not start if obj.conf has a configuration error. |
Add these lines at the top of the obj.conf file, which is located in the config subdirectory of your Web server installation:
Init fn="load-modules" shlib="NSAPI_PLUGIN_PATH" funcs="conn_init,conn_service"
Init fn="conn_init" configfile="REDIRECTOR_CONFIG_FILE_PATH"
where NSAPI_PLUGIN_PATH is the complete path and name of the NSAPI plug-in you are creating, and REDIRECTOR_CONFIG_FILE_PATH is the complete path and name of the redirector configuration file. The redirector configuration file can be any name and location you choose but must be defined by the "configfile" attribute. Table 9-2 shows examples for each Web server type; each example uses "neptune" as the name of the Web server, and "conn_config" as the name of the configfile.
Sample plug-in and redirector locations |
---|
For Netscape 3.6 on Solaris
Init fn="load-modules" shlib="NETSCAPE_INSTALL_DIR/bin/https/libjeas_httpd36.so " funcs="conn_init,conn_service" Init fn="conn_init" configfile="/webserver/https-neptune/config/conn_config " |
For IPlanet 4.1 on Solaris
Init fn="load-modules" shlib="IPLANET_INSTALL_DIR/bin/https/libjeas_httpd40.so " funcs="conn_init,conn_service" Init fn="conn_init" configfile="/webserver/https-neptune/config/conn_config " |
For Netscape 3.6 on NT
Init fn="load-modules" shlib="NETSCAPE_INSTALL_DIR/bin/https/libjeas_httpd36.dll " funcs="conn_init,conn_service" Init fn="conn_init" configfile="c:/webserver/https-neptune/config/conn_config " |
For IPlanet 4.1 on NT
Init fn="load-modules" shlib="IPLANET_INSTALL_DIR/bin/https/libjeas_httpd40.dll " funcs="conn_init,conn_service" Init fn="conn_init" configfile="c:/webserver/https-neptune/config/conn_config " |
Use forward slashes in the configuration file regardless
of platform.
Context paths inform the Web server which requests are directed to the redirector. In the obj.conf file, search for this line:
<Object name=default>
Immediately after this line, add the lines that define the
context paths. For example, if you have two Web applications named "ws_test" and "examples", the
lines that direct requests of the form http://host-name/examples/*
and http://host-name/ws_test/*
to
the redirector are:
NameTrans fn="assign-name" from="/ws_test/*" name="EASProxy"
NameTrans fn="assign-name" from="/examples/*" name="EASProxy"
Figure 9-3 illustrates how a client request for examples/test.jsp and examples/images/welcome.gif to the Web server and port Web1:8020 are redirected to jag1:8080.
Figure 9-3: "examples" requests
are redirected to EAServer
At the end of the obj.conf file, add the lines that add the EASProxy object and specify which HTTP methods are forwarded to the redirector:
<Object name=EASProxy>
ObjectType fn="force-type" type="text/plain"
Service method="(GET|HEAD|POST)" fn="conn_service"
</Object>
This section describes how to set the redirector configuration file directives to:
Edit the redirector configuration file to add the Connector.WebApp directive, which maps requests sent to the redirector by the Web server to EAServer HTTP listeners. The syntax is:
# Syntax of the WebApp directive # This is a comment Connector.WebApp contextpath1 [, contextpath2, and so on] = http://host:port [, http://host:port, and so on]
For example, if "neptune" is the name of your Web server, and WEB_SERVER_INSTALL_DIR/https-neptune/config/conn_config is the name and location of the redirector configuration file, you would edit conn_config to:
Connector.WebApp /testapp = http://jaghost1:8080
Connector.WebApp /estore1, /estore2, /estore3 = http://neptune:8080
Connector.WebApp /* = http://foobar:8080, http://neptune:8080
Connector.WebApp examples=http://jaghost1:8080, http://jaghost1:3080, http://jaghost2:8080
http://jaghost1:8080
.
http://web_server:8020/testapp/test.jsp
,
the redirector forwards the request to http://jaghost1:8080/testapp/test.jsp
.
http://neptune:8080
.
http://web_server:8020/estore1/sign_in.jsp
,
the redirector forwards the request to http:/neptune:8080/estore1/sign_in.jsp
.
NameTrans fn="assign-name" from="/*" name="EASProxy"
Connector.WebApp /* = http://jaguar_host:jaguar_listener
You must make entries in the redirector configuration
file on a single line, but you can combine EAServer hosts in one
entry or multiple entries. For example:
Connector.WebApp /*=http://rainforest:8080,http://neptune:8080is the same as:
Connector.WebApp /*=http://rainforest:8080
Connector.WebApp /*=http://neptune:8080In addition, the server hosts specified by the WebApp directive (in this case, "rainforest" and "neptune") must match the host names you define for your EAServer HTTP listeners. Use Jaguar Manager to view and set host names for your EAServer HTTP listeners. See the EAServer System Administration Guide for more information.
Edit the redirector configuration file to add the Connector.LogLevel directive, which sets the redirector logging level that is sent to the Web server log file. The syntax is:
# Syntax of the LogLevel directive # This is a comment Connector.LogLevel [ inform | error | verbose ]
where "inform", "error", and "verbose" are the three logging levels, as described in Table 9-3.
Logging level | Description |
---|---|
inform | Adding the Connector.LogLevel
inform
line to the redirector configuration file
provides minimum logging to the Web server log file and is appropriate
for production servers. This is the default logging level.
|
error | Adding the Connector.LogLevel
error
line to the redirector configuration file
is appropriate when you want to log error messages to the Web server
log file. Error messages provide additional information, such as
the Web server disconnecting from EAServer or not connecting to
an EAServer.
|
verbose | Adding the Connector.LogLevel
verbose
line to the redirector configuration
file provides the highest level of logging to the Web server log
file and can be used only with the EAServer debug libraries to provide
additional trace information that may be useful for diagnosing problems.
|
Copy the libraries listed in Table 9-4 from your JAGUAR_HOME/lib directory into the appropriate Web server directory.
Platform | Files copied from JAGUAR_HOME/lib | Web server destination directories |
---|---|---|
NT |
|
Netscape 3.6 and IPlanet 4.1:
\WEB_SERVER_INSTALL_DIR\bin\https |
Solaris |
|
Netscape 3.6:
/WEB_SERVER_INSTALL_DIR/bin/https IPlanet 4.1: /WEB_SERVER_INSTALL_DIR/bin/https/lib |
For production purposes, copy libraries from the JAGUAR_HOME/lib directory.
The libraries in JAGUAR_HOME/devlib are
for debugging only.
Copyright © 2002 Sybase, Inc. All rights reserved. |
![]() |