[Top] [Prev] [Next] [Bottom] [Contents]

Sapphire Application Server Configuration File

If you decide to edit the configuration file by hand (not recommended) you can find it in the /config directory where you installed Sapphire/Web. The name of this file is apserver.txt.

The configuration file has this format:

[/<name of application server 1>]
session_affinity=[0 or 1]
program=<path>
file_path=<path>
host=<host1>:<ports>
host=<host2>:<ports>
host=<host3>:<ports>
	.
	.
host=<hostn>:<ports>
[/<name of application server 2>]
session_affinity=[0 or 1]
program=<full path to application server executable>
file_path=<full path to files used by the application 
server>
host=<host1>:<ports>
	.
	.
host=<host2>:<ports>
	.
	.
host=<host3>:<ports>
	.
	.
host=<hostn>:<ports>
where

<name of application server> is the unique name of the application server built from a Sapphire project. Note that there is a / before all of the application server names. This name is compared with the PATH_INFO sent by a browser to determine if this is the app server to run.

On a UNIX system the name of the application server is typically

/[project name].cgi
Note that the file extension can be set using the project option Makefile.exe Suffix.

<host> is the host that the application server is running on.

<ports> are the ports that the specified app server(s) will listen to. You can specify ports in 3 different ways :

An example is 8000-8003. This example says that there is a server running at ports 8000,8001,8002 and 8003.
8000 4 means that there is a server running at ports 8000,8001,8002 and 8003
<path> is the full path to the application server executable. This is optional. If it is not specified then the application server will use the defaults built into the project.

Rules

There a few rules you must follow when adding a new server:

Example

An example configuration file is as follows:

[/tut2.cgi]
session_affinity=0
program=/usr/sapphire/projects/tut2/tut2.cgi
file_path=/usr/website/sapphire/tut2
host=marquez:8888 3
host=cezanne:8888,8889,8890
host=picasso:8888-8890
[/shoppingCart.cgi]
session_affinity=0
program=/usr/sapphire/projects/shoppingCart.cgi
host=marquez 10000
host=cezanne 10000
host=picasso 10000
host=marquez 10001
host=cezanne 10001
host=picasso 10001

This configuration file defines two server applications tut2 and shoppingCart.

Note that each port specified means that there should be an application server running and listening at that port. These servers can be started automatically if you run the Sapphire App Server Manager from the Sapphire Gateway Manager tool.



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.