JRun 4: Manually Configuring External Web Server Connectors
There may be times when it is necessary to manually configure JRun's external web server connector in order to establish the connection between the JRun server and the web site. This article will demonstrate the steps required for manually configuring a connection to an Apache, IIS and iPlanet web site.
JRun's Web Server Configuration tool (wsconfig.jar) uses JNDI to discover running JRun servers. If the wsconfig tool is unable to automatically locate a JRun server (perhaps while setting up a distributed system) you can still manually configure the connection by following the instructions in this article.
- Setup steps common to each web server
- Apache Configuration
- Microsoft IIS Configuration
- iPlanet 4 Configuration
- iPlanet 6 Configuration
Setup steps common to each web server
For these examples, we will assume the use of three JRun servers:
- Server1 (on proxy port 51001 - connecting to Apache 2.x)
- Server2 (on proxy port 51002 - connecting to IIS 5)
- Server3 (on proxy port 51003 - connecting to iPlanet 4 or 6)
We will also assume that the {jrun-root} directory is C:\jrun4.
Step 1: Create the following directories under {jrun-root}\lib (one for each connected web site):
- C:\jrun4\lib\wsconfig\1 (this folder will contain configuration information for Apache)
- C:\jrun4\lib\wsconfig\2 (this folder will contain configuration information for IIS)
- C:\jrun4\lib\wsconfig\3 (this folder will contain configuration information for iPlanet)
Step 2: Create a file namedwsconfig.properties in the C:\jrun4\lib\wsconfig directory. The wsconfig.properties file contains the data that the Web Server Configuration tool uses to maintain web server configuration information. It should contain the following information (actual locations should reflect your specific installation directories):
#JRun Web Server Configuration File
#Fri May 23 10:19:20 EDT 2003
1=Apache,C:/Apache Group/Apache2/conf,"","",""
1 .srv=localhost,"server1"
2 =IIS,1,false,""
2 .srv=localhost,"server2"
3 =NES,C:/Netscape/Server4/https-servername/config
3 .srv=localhost,"server3"
Step 3 - Configure the Web Server(s).
Apache Configuration:- Populate the C:\jrun4\lib\wsconfig\1 directory with the following files:
-
- jrunserver.store - create a file called jrunserver.store and enter the following information:
proxyservers=127.0.0.1:51001
(Notice that 51001 corresponds to the port assigned to Server1).
- mod_jrun20.so (extract the appropriate file for your operating system from C:\jrun4\lib\wsconfig.jar)
-
Note:mod_jrun20.so supports Apache 2.x web servers. To connect to Apache 1.3.x, usemod_jrun.so.
- jrunserver.store - create a file called jrunserver.store and enter the following information:
- Edit the Apache configuration file (located in{apache-root}/conf/httpd.conf ) and add the following section at the end of the file:
-
# JRun Settings
LoadModule jrun_module c:/jrun4/lib/wsconfig/1/mod_jrun20.so
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore c:/jrun4/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51001
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .jsp .jws
</IfModule>Note the following entries from the Apache configuration file, above:
- LoadModule jrun_module c:/jrun4/lib/wsconfig/1/mod_jrun20.so - points to the folder and file name of the Apache connector
- JRunConfig Serverstore c:/jrun4/lib/wsconfig/1/jrunserver.store - points to the location of the jrunserver.store file
- JRunConfig Bootstrap 127.0.0.1:51001 - corresponds to defined port for Server1
Microsoft IIS Configuration:
- Extract the jrunwin32.dll from the C:\jrun4\lib\wsconfig.jar and copy it to C:\jrun4\lib\wsconfig\
- Extract the jrun.dll from C:\jrun4\lib\wsconfig.jar and copy it to C:\jrun4\lib\wsconfig\2
- Create a jrun.ini file in C:\jrun4\lib\wsconfig\2 . It should contain the following information:
verbose=false
scriptpath=/JRunScripts/jrun.dll
serverstore=C:/JRun4/lib/wsconfig/2/jrunserver.store
bootstrap=127.0.0.1:51002
apialloc=false
ssl=false
ignoresuffixmap=false
#errorurl=<optionally redirect to this URL on errors> - Create the jrunserver.store file in C:\jrun4\lib\wsconfig\2
Edit as follows:proxyservers=127.0.0.1:51002
- Using the IIS Management Console add a virtual directory named JRunScripts to the web site
The Local Path property of the folder should point toC:\jrun4\lib\wsconfig\2 and
Execute Permissions must be set to "Scripts and Executables" - Add the JRunConnector Filter to the ISAPI Filter properties of the web site by:
- Right clicking on the web site
- Selecting the ISAPI Filters tab
- Click the Add button
- In the "Filter Name" text box, enter "JRun Connector Filter"
- In the "Executable" text box, browse to or enter"C:\jrun4\lib\wsconfig\2\jrun.dll"
- Restart the World Wide Web Publishing service (in Control Panel) and check the ISAPI Filter property for the web site. The JRun Connector Filter
should show a high priority with a green arrow pointing upwards.
- Extract the jrun_nsapi35.so file from the C:\jrun4\lib\wsconfig.jar file and copy it to theC:\jrun4\lib\wsconfig\3 folder.
- Create a jrunserver.store file in the C:\jrun4\lib\wsconfig\3 folder.
Edit it as follows:proxyservers=127.0.0.1:51003
- Add the following to the Init section of the obj.conf file for the iPlanet server (note each Init is a single line):
Init fn="load-modules" shlib="C:/JRun4/lib/wsconfig/2/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice"
Init fn="jruninit" serverstore="C:/JRun4/lib/wsconfig/3/jrunserver.store" bootstrap="127.0.0.1:51003" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false" - Add the following to the Object name="default" section of the obj.conf file:
NameTrans fn="jrunfilter" serverstore="C:/JRun4/lib/wsconfig/3/jrunserver.store"
ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/"
ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/"
Service method=(GET|POST) type="jrun-internal/" fn="jrunservice" - Add the following to the end of the obj.conf file:
<Object name="jrun">
PathCheck fn="jrunfilter"
Service fn="jrunservice"
</Object> - Restart the web server.
- Use steps 1 and 2 of iPlanet 4 configuration
- Add the following to the object-default section of the obj.conf file:
NameTrans fn="jrunfilter" serverstore="C:/JRun/lib/wsconfig/3/jrunserver.store" bootstrap="127.0.0.1:51003"
ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/"
ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/"
Service method=(GET|POST) type="jrun-internal/" fn="jrunservice" - Add the following to the end of the obj.conf file:
<Object name="jrun">
PathCheck fn="jrunfilter"
Service fn="jrunservice"
</Object> - Add the following to the end of the magnus.conf file (note each Init is a single line):
Init fn="load-modules" shlib="C:/JRun/lib/wsconfig/3/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice"
Init fn="jruninit" serverstore="C:/JRun/lib/wsconfig/3/jrunserver.store" bootstrap="127.0.0.1:51003" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false" - Restart the web server.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
