Mon
目次
Location
/usr/local/bin/$objtype/mon
Usage
mon [-d] [-u user] [-r req] cmdpath argument ...
Description
mon
is a program that is designed to be used with Pegasus httpd to protect against malicious cgi programs that attempt to kill httpd.
mon
invokes httpd to run asuser
and monitors the httpd to invoke subsequenthttpd
if it is killed by someone.
mon
should be executed by host owner.
cmdpath
is the path of Pegasus httpd, and arguments are of httpd.
-d
: run as a daemon-u user
: run as useruser
. usuallyweb
-r req
: used for https support, wherereq
is factotum format of X.509 certificate signing request.
Example
The following lines in "/rc/bin/cpurc" is enough for http and https service.b=/usr/local/bin/$cputype $b/mon -du web $b/httpd -suM c=/sys/lib/tls/cert k=/sys/lib/tls/key $b/mon -du web -r $k $b/httpd -suM -p443 -c $c