httpd
2002/02/01
NAME
httpd
SYNOPSIS
httpd [-msuwM] [-t timeout] [-a srvaddress] [-d domain] [-n namespace]
[-r webroot] [-R rewrite] [[httpd] dummy .. incalldir]
DESCRIPTION
Options
-m: allow mount in CGI program.
This option is currently useful for old kernel of CPU server.
-s: execute httpd as server mode.
Without this option httpd must be invoked by `listen'.
For details see server mode
-u: httpd is served as the user who invoked httpd.
This option is effective only in server mode.
For details see server mode.
-w: httpd does not automatically open $home/web to the public.
-M: httpd is used with mon.
This option is effective only in server mode.
For details see server mode
-t: time out for CGI programs.
This option in intended to the protection for buggy CGI programs.
The default value is 5 seconds.
-a: service address. The default is tcp!*!80
-d: domain name. The default is the domain of the system.
-n: namespace configuration file. The default is /lib/namespace.httpd
-r: root directory of httpd server on which name space is configured.
The default is /usr/web
-R: URI rewrite file. The default is /sys/lib/httpd.rewrite
Remaining arguments are given by `listen' when httpd is called by listen,
therefore don't specify.
Document root of server's main document can be at anywhere.
The location is configured in namespace configuration file of httpd.
The standard location of Pegasus is /usr/local/bin/386.
Then typical way of execution is as bellow:
In case of server mode, write a line
/usr/local/bin/386/httpd -s
in /bin/rc/cpurc.
In case of non-server mode, that is, if you want to execute httpd under listen,
create
/rc/bin/service/tcp80
and chmod 755 to this file, and write
#!/bin/rc
exec /usr/local/bin/$cputype/httpd $*
Service space
The http service of Pegasus is executed in the configured namespace.
The configuration is done in the configuration file (default /lib/namespace.httpd).
Document root
Document root is fixed to
/doc
in the service space.
Clients who access to Pegasus can access only to the files in the document
space and the name is not begin with period.
Other files in the service space can be accessed only via CGI programs.
Document space
The set of files bellow /doc in the service space.
URI redirection file
URI redirection is done in two level.
/sys/lib/httpd.rewrite is applied to all requests to Pegasus.
These requests are sifted out to the server's main document, server's virtual
host's document and server's user's documents.
And then the request is redirected again by
/etc/rewrite
in service space. (This means virtual hosts and users are permitted to have
redirection file.)
The former configures administrative redirections and directories of virtual
hosts.
The latter describes the information of moved pages.
(Note that /sys/lib/httpd.rewrite is a system file and unable to touched
without administrative privilege, on the other hands the file /etc/rewrite in
service space is a file owned by the person who has created html documents.)
SEE ALSO
user
virtual host
RELATED FILES
/lib/namespace.httpd
/sys/lib/mimetype
/sys/lib/httpd.rewrite
/sys/log/http
/rc/bin/service/tcp80
/lib/namespace
/lib/ndb/local
!