Logo address

httpd

目次

Location

	/usr/local/bin/386/httpd

Synopsis

	httpd [-Mfmsuw] [-t timeout] [-p port] [-c certificate] [-n namespace] [-R rewrite] [[httpd] dummy ..  incalldir]

Options

-m: allow mount in $web/etc/namespace_80
-s: execute httpd as server mode.
Without this option httpd must be invoked by `listen'.
-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.
-p: port address. The default is 80
-c: path to certificate of PEM format.
-n: namespace configuration file. The default is /lib/namespace.httpd
-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.
I recomment the place at:
	/usr/yourname/www/doc
The location is configured in namespace configuration file of httpd.
You will find example configuration in the distribution.

The standard location of httpd 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  $*

Definition of names used in Pegasus manual

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. This direcory is
$web/doc
in real space where {$web} is web root that is defined in {/sys/lib/httpd.rewrite}. 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. Requests are sifted out to real host document, virtual host document and user documents. And then the request is redirected again by
$web/etc/rewrite
The former configures web root of real and 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 {$web/etc/rewrite} in service space is a file owned by the person who has created html documents.)

See also

Related files