Pegasus may have mutiple document root.
All document roots are expressed as
$web/docThen,
/lib/namespace.httpdThe resulted name space is called service space or httpd space.
/lib/namespace.httpdThe resulted name space is called document space.
By default, system users are allowed to have their web pages under the directory
$home/web/docthat can be accessed using "~" prefix such as URL:
http://hostdomain/~alice
Locations of document roots of real host and virtual hosts may be anywhere. By default, these httpd roots are configured in
/sys/lib/httpd.rewrite
The convenient places will be under the home directory of document owner, for example,
/usr/bob/www/doc
If Pegasus accepts a HTTP request, it immediately enters appropriate httpd root and closes the door.
Thus, Pegasus is running in closed service space in servicing.
This means, the httpd looks all web contents under /doc
.
Pegasus has two types of access control. One is based on IP address and another is based on password. The related files are:
$web/etc/allow $web/etc/passwd
web
Pegasus httpd is running as user web
. The user is one of virtual user, that is, the password must not be assigned.
The user web
has a home direcory
/usr/web/Owner under this directory should be host owner, and all files must be readable but not be writable by user
web
except directory/usr/web/etc/nonceThe directory must be readable, writable and executable by
web
.
In muti-user environment, it might be better to have a group for web users.
The following lines are an example for /adm/users
10006:web:glenda: 10007:webu:glenda:web,bob,aliceif your fs is cwfs.
/lib/namespace.httpdNote that the following directories will be bound to httpd space by the default configuration:
/bin /sys/lib /lib /envetc, and,
/usr/web/bin/rc /usr/web/bin/$objtype
If you want to have CGI, then you must have CGI handler
$web/etc/handlerwhich is a configuration file for CGI.
You may have your additional programs to be used for CGI in the following directories.
$web/bin/rc $web/bin/$objtype
CGI programs may be located anywhere in document space.
You may have rewrite rule file and namespace configuration files:
$web/etc/rewrite $web/etc/namespace_$portfor each your service space. ($port is the port number in command option of httpd.)