httpdwhenever a request comes in. (These steps are the same for any daemon under unix: you will probably find a similar thing has been done for the FTP daemon,
httpdinto a suitable directory such as
/usr/etc.Make it owned by
root, and make it writable only to
root,for example by saying:
chmod 755 httpd
/etc/servicesfile, or use the name of a specific service of your own if you want to use a special port number. Standard port number for HTTP is 80.
http 80/tcp # WWW serverExceptions:
http stream tcp nowait root /usr/etc/httpd httpdFirst word is the same as in
If you want to pass command line options or
httpd, they would listed be in the end
of line, for example to set the rule file to something else than the
http stream tcp nowait root /usr/etc/httpd httpd -r /my/own/rulesNote: For
httpdversion 2.15 and later we recommend that it is run as user
rootis safe, since it automatically resets its user-id to
nobody.However, if you decide to use access authorization features, and you need to serve protected files,
httpdwill have to be able to set its user-id to some other uid as well. In any case,
httpdalways sets its user-id to something other than
rootbefore serving the file to the client.
/etc/inetd.conf syntax varies from
system to system, for example all systems don't have the field
specifying the user name, in which case the default is
root. If in doubt, sopy the format of other lines in
Note: There seems to be a limit of 4 arguments passed
inetd, at least on the NeXT.
inetd.conf,find out the process number of
inetd,and send a "HUP" signal to it.
For example on BSD unix do this:
> ps -aux | grep inetd | grep -v grep root 85 0.0 0.9 1.24M 304K ? S 0:01 /usr/etc/inetd > kill -HUP 85For system V, use
ps -elinstead of
ps -aux. Be aware that on some systems your local file /etc/services may not be consulted by your system (see notes on debugging).