/usr/web
/sys/lib/httpd.rewrite
/lib/namespace.httpd
listen
2003/01/11 updated
Here I explain how to install Pegasus that does not use CGI.
pegasus-2.0b.tgz
pegasus
will be created in the directory in which you execute tar
. Let this directory be $pegasus
.main: undefined: estrdup in mainplease comment out
estrdup
in emem.c
. The function is now in library and your system might be old.
/usr/web
/usr/web
is a base directory on which Pegasus configures namespace.( You can use other directory in /sys/lib/httpd.conf
)term% mkdir /usr/webYou need not register user
web
to /adm/users
if you do not run Pegasus as server mode. Don't owner of /usr/web
be web
. Give permission to others
to execute and read.$pegasus/example/usr/web
to /usr/web
. The copy is easy if you use my tool cpdir
. You can get cpdir
from http://plan9.aichi-u.ac.jp/netlib/cmd/
.term% cpdir -mv $pegasus/example/usr/web /usr/webNever set these directory owner to be
web
. Permit others to read and execute.example/usr/web
is configured for CGI, therefore there are needless directories if you do not use CGI. I think they are harmless./usr/web/doc
. This directory is something like a dish to which web content is dynamically bound.
bob
then/usr/bob/www/docis recommended directory.
$home/web/docwhere
$home
is home directory of the user. Let the user be alice
, then the home page will be accessed from the client with URIhttp://your.host.com/~alicewhere
your.host.com
is domain name of your server.
/sys/lib/httpd.rewrite
/usr/bob/www/doc
. Write a line/ */usr/bob/wwwin
/sys/lib/httpd.rewrite
. Special setting of user's web root is not required.
/lib/namespace.httpd
$pegasus/sample/lib/namespace.httpd
as it is. Although the content is configured for CGI, I think harmless.
listen
listen
then to run in server mode./rc/bin/service/tcp80with the content
#!/bin/rc exec /usr/local/bin/$cputype/httpd $*and access mode
--rwxrwxr-x
bob
. Make a HTML document/usr/bob/www/doc/index.htmland try to access using a browser.
/usr/bob/www/docHttpd will see the directory as
/docNote that we have two expression for same directory.
Pegasus rejects to send a file that begins with period `.
'.
Besides above two generic rules you can define directories that can be controlled by IP or password. The control files are in
/usr/bob/www/etcFor details see access control.