httpd
httpd [-Mmuw] [-C conf] [-p port] [-c certificate]
-C
conf
/sys/lib/httpd.conf
.-c
certificate
-p
port
-m
$web/etc/namespace_$port
, where $port
is the port given by -p
.-u
-w
/usr/$user/web
to the public.-M
where $web
is a http root for the web document.
-s: execute httpd as server mode.
The following options in older versions are discarded because they can be given in httpd.conf.
-n: namespace configuration file. The default is /lib/namespace.httpd.
-R: URI rewrite file. The default is /sys/lib/httpd.rewrite.
-t: time out for CGI programs.
Document root of real and virtual servers can be anywhere.
The recommented place is:
/usr/yourname/www/docThe location is configured in
/sys/lib/httpd.rewrite
(by default).
The following configuration is a live example of mine:
http://plan9 */usr/arisawa/www https://plan9 */usr/arisawa/www http://202.250.160.122 */usr/arisawa/www https://202.250.160.122 */usr/arisawa/www http://cpa */usr/cpa/www / */usr/arisawa/httpwhere
plan9
is a IP based virtual host, and cpa
is a name based virtual host.
/usr/local/bin/$objtype
.web
so that Pegasus can do services in secure manner.web
.web
with the help of mon
.b=/usr/local/bin/$objtype $b/mon -du web $b/httpd -uM c=/sys/lib/tls/cert r=/sys/lib/tls/key $b/mon -du web -r $r $b/httpd -uM -p443 -c $cYou may also execute Pegasus like this:
b=/usr/local/bin/$objtype $b/httpdThen Pegasus runs as user
none
. However this is not recommended in multi-user environment if you have files that should be private for you or that should be written only by your CGI.
/usr/local/bin/$objtype/httpd
http://plan9.aichi-u.ac.jp/netlib/pegasus/
.jpg image jpeg - y #.jpg image pjpeg - y
/sys/lib/httpd.conf
/lib/namespace.httpd
/sys/lib/mimetype
/sys/lib/httpd.rewrite
/usr/web/
/sys/log/http
/sys/log/blacklist
/sys/log/rejectdb
/lib/ndb/local
$web/etc/allow
$web/etc/passwd
$web/etc/handler
$web/etc/namespace_80
$web/etc/namespace_443
$web/bin/$objtype
$web/bin/rc