If your machine crashes or is taken offline, the server stops and any requests it was servicing are lost. You can restart the server using one of the following methods:
If you are using a version of Unix not derived from System V (such as SunOS 4.1.3), you won't be able to use the inittab option.
NoteYou can't run a secure server with either of these methods because the server requires a password before starting, unless you keep the password in plaintext in a file. This practice is not recommended.
inittab
, put the following text on one line in the /etc/inittab
file:
The -i option prevents the server from putting itself in a background process.
http:2:respawn:[ServerRoot]/[type-identifier]/start -iReplace [
ServerRoot
] with the directory where you installed the server, and replace [type-identifier
] with the server's directory.
You'll need to remove this line before you try to stop the server.
/etc/rc.local
, or your system's equivalent, place the following line in /etc/rc.local
:
[ServerRoot]/[type-identifier]/startReplace [
ServerRoot
] with the directory where you installed the server.
[ServerRoot]/[type-identifier]/startReplace [
ServerRoot
] with the directory where you installed the server.
You can use optional parameters at the end of the line:
-p XX
starts the server on a specific port number. This overrides the setting in magnus.conf
.
-i
runs the server in inittab
mode, so that if the server process is ever killed or crashed, inittab
will restart the server for you. It also prevents the server from putting itself in a background process.
NoteIf the server is already running, this command will fail. You must stop the server first, then use the start command. Also, if the server startup fails, you should kill the process before trying to restart it.
[ServerRoot]/[type-identifier]/restartThis script finds the parent process id (in the
logs/pid
file), and sends the hang-up (-HUP) signal with this process id.
inittab
for restarting the server, you'll need to remove the line from /etc/inittab
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:
[ServerRoot]/[type-identifier]/stop
NoteNormally, you should not change the listen-queue size. The default setting is sufficient in most cases. If you manage a heavily used web site, you should make sure your system's listen-queue size is large enough to accommodate the listen-queue size setting from the Server Manager form. If you do change the listen-queue size, make sure that your system supports the new listen-queue size you've set. The listen-queue size set from the Server Manager form changes the listen-queue size requested by the server. If the server requests a listen-queue size larger than the system's maximum listen-queue size, the listen-queue size will default to the system's maximum.
Caution!Setting the listen-queue size too high can be detrimental to server performance. The listen-queue size was designed to prevent the server from becoming overloaded with connections it cannot handle. If your server is overloaded and you increase the listen queue size further, the server will only fall farther behind.
NoteBe aware of the consequences of turning off DNS on your server; host name restrictions won't work, and hostnames won't appear in your log files. Instead, you'll see IP addresses. You can also specify whether to cache the DNS entries. When the server gets a client's host name information, it can store the data, if you've enabled the DNS cache. Then if the server needs information about the client in the future, the information is cached and available for the server without querying for the information again. You can specify the size of the DNS cache and the time it takes before a cache entry becomes invalid. The DNS cache can contain 32 to 32768 entries; the default value is 1024 entries. Values for the time it takes for a cache entry to expire can range from 1 second to 1 year (specified in seconds); the default value is 1200 seconds (20 minutes).
If you don't know how to create a new user on your system, ask your system administrator or consult your system manual.Even if you need to start the server as root, you don't want it to run as root all the time. You want it to have restricted access to your system resources and run as a nonprivileged user. The user name you enter as the Server User should already exist as a normal Unix user account. After the server starts, it runs as this user. If you want to avoid creating a new user account, you can choose the user
nobody
or an account used by another HTTP server running on the same host. On some systems, however, the user nobody
can own files but not run programs.
To change the server's user account, do the following: http://www.netscape.com:8080
If you aren't sure the
port number you
plan to use is
available, look at the
/etc/services
file on the server
machine.
Port numbers for all network-accessible services are maintained in the file /etc/services
on Unix machines. The standard unsecure web server port number is 80; the standard secure web server port number is 443.
Technically, the port number can be any port from 1 to 65535. If you aren't running as root or superuser when you install or start the server, you'll have to use a port number higher than 1024.