Pegasus 2.8
2014/10/10Changes from Ver.2.7 to 2.8
httpd
A new flag -C is introduced to httpd command. The new usage is
httpd [-Mmuw] [-C conf] [-p port] [-c certificate]
Following command flags of httpd are gone.
-s
: server flag. — now httpd always run as server mode.-n
: namespace configuration file. — now supported in httpd.conf.-R
: rewrite file. — now supported in httpd.conf.-t
: CGI timeout. — now supported in httpd.conf.
httpd.conf
Added new parameter rejectdb in httpd.conf.Typical setting is
rejectdb /sys/log/rejectdbThe /sys/log/rejectdb is a database of collection of IP addresses (one IP per line).
HTTP requests from IP in the database are silently rejected.
I mean by “silently” these access logs are not written in log file /sys/log/http.
Why not be written in log file?
I observed strange accesses from a client. The client persistently have accessed to one of pages of my server in a very long period of time, which resulted in consumption of 37MB storage in a month.
If you don't want this new feature, comment out the line.
Of course, you can reject IPs using access control file “allow” as has been. Then the access log will be written in /sys/log/http.
URI syntax
Pegasus has been accepting old URI syntax defined in rfc2068.abs_path = "/" rel_path rel_path = [ path ] [ ";" params ] [ "?" query ] path = fsegment *( "/" segment ) fsegment = 1*pchar segment = *pchar params = param *( ";" param ) param = *( pchar | "/" )Looking the syntax, a symbol “
;
” in path part of URI plays special role (though not defined).However, the
params
part was obsoleted in current RFC (rfc2616 and rfc3986).That is, the symbol “
;
” is nothing special in URI path.
Pegasus 2.8 is adjusted to fit the URI syntax to current one.
WebDAV support under protection against brute clients
Pegasus 2.8 introduced new protection scheme so that it keeps server response to the legitimate clients.Authenticated client will not be affected by the protection.
This scheme is necessary to support WebDAV because WebDAV client needs vast numbers of accesses in a second.
New WebDAV script (ver.1.3) based on Lua 5.2
The webdav requires 9lua-5.2.Look
http:/netlib/lua/Lua-2014/
and
http:/netlib/lua/Lua-app-2014/
9lua-5.2
is Plan 9 extension of Lua-5.2.
Bug fix
Virtual hosts cannot have user's URL, that is, URL such ashttp://p9.nyx.link/~alice
This was true in old days. However since some time or another, this have been untrue. This bug is fixed in this version.
Documentation
Fixed many unlinked documentation in Web pages.
For Those Who Are New to Pegasus
Look the concept
The concept of Pegasus is much different from other web servers.Web pages in Pegasus is sandboxed per each document owner.
Look first "Pegasus — another httpd for Plan 9 —" which illustrate the concept and the administration of Pegasus 2.2. Though a bit old, most of them are kept as it is until today.
Introduction to Pegasus
Introductory survey of Pegasus is provided in this release.Look Introduction.
Installation instruction
Here is an installation instruction for basic configuration.installation instruction for Pegasus 2.8
In this instruction, you will learn concrete example for administration as well as the concept.
Administration
System Level
- httpd
-
running httpd
- mon
-
running httpd as user “web”
- /sys/lib/httpd.conf
-
if you dislike the default
- /sys/lib/httpd.rewrite
-
rewrite rule — map of requested URL to the contents
- /lib/namespace.httpd
-
name space for httpd — basic httpd name space provided by system administrator.
- /sys/log/http
-
log file format of Pegasus
User Level
Files listed below are for user level administration.They are to be located in
$web/etc/
where $web
is a httpd root.
- allow
-
access control by IP
- passwd
-
access control by password
- handler
-
CGI handler
- namespace_
port
-
where
port
is port number (80 for example).
Format of this file is same as /lib/namespace.httpd.
- rewrite
-
Format of this file is same as /sys/lib/httpd.rewrite.
Applications
- webdav
-
If you like WebDAV
Look also Pegasus 2.4 document
- ftp2html
-
A CGI that is used for net library (
http:/netlib/
)
- man.html
-
A CGI that is used for looking Plan 9 manual (
http:/man/
)
Tools
- rit
-
Rc In Text (a text processor for Plan 9).
Useful in writing CGI.
- Remoty
-
a home page management tool using Web browser.
- formparse.