Once the server is installed, it runs constantly, listening for and accepting HTTP requests.
The status of the server appears in the Server On/Off page. You can start and stop the server using one of the following methods:
Click the Server On or Server Off in The Server On/Off Page.
Use the Services window in the Control Panel (Windows).
Use the start. To use this script with init, include the start command http:2:respawn:server_root/type-identifier/start -start -i in /etc/inittab. (UNIX/Linux)
Use stop, which shuts down the server completely, interrupting service until it is restarted. If you set the etc/inittab file to automatically restart (using “respawn”), you must remove the line referring to the web server in the etc/inittab before shutting down the server. If not the server automatically restarts (UNIX/Linux).
After you shut down the server, it might take a few seconds for the server to complete its shut-down process and for its status to change to “Off.”
If your machine crashes or is taken offline, the server stops and some of the requests being serviced can be lost.
If you have a security module installed on your server, enter the appropriate passwords before starting or stopping the server.
On a UNIX platform, some Sun Java System Web Server installations may require access to a large amount of memory and/or file descriptors than allowed by default. If you are unable to start the server, check the resource limits imposed by your operating system using the ulimit command. The operating system’s ulimit man page should provide more information.
When the server is turned off, it cannot accept new connections. It then waits for all outstanding connections to complete. The time the server waits before timing out is configurable in the magnus.conf file, which can be found in server_root/https-server_name/config/. By default it is set to 30 seconds. To change the value, add the following line to magnus.conf:
TerminateTimeout seconds
where seconds represents the number of seconds the server waits before timing out.
The advantages to configuring this value is that the server will wait longer for connections to complete. However, because servers often have connections open from nonresponsive clients, increasing the termination timeout may increase the time it takes for the server to shut down.
To restart the server use one of the following methods:
Automatically restart it from the inittab file.
If you are using a version of UNIX/Linux not derived from System V (such as SunOS 4.1.3), you will not be able to use the inittab file.
Automatically restart it with daemons in the /etc/rc2.d when the machine reboots.
Restart it manually.
Because the installation scripts cannot edit the /etc/rc.local and /etc/inittab files, you must edit these files with a text editor. If you do not know how to edit these files, consult your system administrator or system documentation.
Typically, you cannot start an SSL-enabled server with either of these files because the server requires a password before starting. Although you can start an SSL-enabled server automatically if you keep the password in plain text in a file, this practice is not recommended.
Leaving the SSL-enabled server’s password in plain text in the server’s start script is a large security risk. Anyone who can access the file has access to the SSL-enabled server’s password. Consider the security risks before storing the SSL-enabled server’s password in plain text.
The server’s start script, key pair file, and the key password should all be owned by root (or, if a non-root user installed the server, that user account), with only the owner having read and write access to these files.
If security risks are not a concern for you,
Using a text editor open the start file located in the server_root/https-server_id.
Locate the -start line in the script and insert the following:
echo "password"|
where password is the SSL password you have chosen.
For example, if the SSL password is netscape, the edited line might look like this:
-start)
echo "netscape"|./$PRODUCT_BIN -d $PRODUCT_SUBDIR/config $@
To restart the server using inittab, include the following text on one line in the /etc/inittab file:
http:23:respawn:server_root/type-identifier/start -start -i
where server_root is the directory where you installed the server, and type-identifier is the server’s directory.
The -i option prevents the server from putting itself in a background process.
Remove this line before you stop the server.
If you use the /etc/rc.local, or your system’s equivalent, place the following line in the /etc/rc.local:
server_root/type-identifier/start
Replace the server_root with the name of the directory in which you installed the server.
To restart the server from the command line, log in as root if the server runs on ports with numbers lower than 1024; Alternatively, log in as root or with the server’s user account. At the command-line prompt, type the following line and press Enter:
server_root/type-identifier/start
where server_root is the directory where you installed the server.
You can use the optional parameter -i at the end of the line. The -i option runs the server in inittab mode, so that if the server process is ever killed or crashed, the inittab will restart the server. This option also prevents the server from putting itself in a background process.
If the server is already running, the start command fails. You must stop the server first, then use the start command. If the server fail to start, you should kill the process before trying to restart it.
If you used the etc/inittab file to restart the server you must remove the line starting the server from /etc/inittab and type kill -1 1 before you try to stop the server. Otherwise, the server restarts automatically after it is stopped.
To stop the server manually, log in as root or use the server’s user account (if that is how you started the server), and then type the following at the command line:
server_root/type-identifier/stop
Restart the server using the Services Control Panel in one of the following ways:
To configure the operating system to restart the server or the administration server each time the machine is restarted.
From the Control Panel double-click the Services icon.
Scroll through the list of services and select the service for your server.
Select Automatic to start the server each time the computer starts or reboots.
Click OK.
You can also use the Services dialog box to change the Server's account. For more information about changing the Server's account, see Changing the User Account (UNIX/Linux).
By default, the web server prompts the administrator for the key database password before starting up. If you want to be able to restart an unattended web server, you need to save the password in a password.conf file. Only do this if your system is adequately protected so that this file and the key databases are not compromised.
The server is automatically restarted by a server-monitoring utility if the server crashes. On systems that have debugging tools installed, a dialog box with debugging information appears if the server crashes. To help debug server plug-in API programs (for example, NSAPI programs), disable the auto-start feature by setting a high timeout value. Also turn off the debugging dialog boxes by using the Registry Editor.
To change the time interval for the server between startup and automatic restart, perform the following steps:
Start the Registry Editor.
Select your server’s key (in the left side of the Registry Editor window, located in HKEY_LOCAL_MACHINE\SOFTWARE\Netscape\Enterprise\6.0).
Choose Add Value from the Edit menu. The Add Key dialog box appears.
In Value Name, type MortalityTimeSecs.
Click OK. The DWORD Editor dialog box appears.
Type the time interval (in seconds) between startup and automatic restart.
The interval can be in binary, decimal, or hexadecimal format.
Click the numerical format for the value you entered in the previous step (binary, decimal, or hexadecimal).
Click OK.
The MortalityTimeSecs value appears in hexadecimal format at the right side of the Registry Editor window.
If you installed an application (such as a compiler) that has modified system debugging settings and the server crashes, you might see a system-generated application error dialog box. The server will not restart until you click OK.