If you are willing to take the risk that your server's security could be compromised, follow these steps in order to have your SSL-enabled server start automatically:
#!/bin/sh
cd [ServerRoot]; ./ns-httpd -d [ServerRoot]/https-[server_identifier]/config $@
echo "[your_SSL-enabled_server_password]"|
For example, the edited third line might look like this:
cd /usr/ns-home/bin/https; echo "MBi12!mo"|./ns-httpd -d [ServerRoot]/https-[server_id]/config $@
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 -i
Replace [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]/start
Replace [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.
Note
 If 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]/restart
This 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
magnus.conf
and obj.conf
).
To view or restore a backup copy of your configuration files,
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,
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.