9srv Manual Collection/plan9/httpd(8) | 9srv Manual Collection/plan9/httpd(8) |
---|
ip/httpd/save
[-b
inbuf]
[-d
domain]
[-r
remoteip]
[-w
webroot]
[-N
netdir]
method version uri
[search]
ip/httpd/imagemap
...
ip/httpd/man2html
...
ip/httpd/webls
...
Httpd supports only the GET and HEAD methods of the HTTP protocol; some magic programs support POST as well. Persistent connections are supported for HTTP/1.1 or later clients; all connections close after a magic command is executed. The Content-type (default application/octet-stream) and Content-encoding (default binary) of a file are determined by looking for suffixes of the file name in /sys/lib/mimetype.
Httpd handles replacements prefixed with @ internally, treating the request as if it were for the replacement (without the @) but not informing the client of the rewritten name. Replacement URLs prefixed with = generate a permanent redirection instead of a temporary one. Httpd checks to see if this file has changed once every 50 new TCP connections. HTTP 1.1 persistent connection implies many pages may come in one browser connection, so to kick-start httpd, try
Save writes a line to /usr/web/save/uri.data and returns the contents of /usr/web/save/uri.html. Both files must be accessible for the request to succeed. The saved line includes the current time and either the search string from a HEAD or GET or the first line of the body from a POST. It is used to record form submissions.
Imagemap processes an HTML imagemap query. It looks up the point search in the image map file given by uri, and returns a redirection to the appropriate page. The map file defaults to NCSA format. Any entries after a line starting with the word #cern are interpreted in CERN format.
Man2html converts man(6) format manual pages into html. It includes some abilities to search the manuals.
Webls produces directory listings on the fly, with output in the style of ls(1). /sys/lib/webls.allowed and /sys/lib/webls.denied contain regular expressions describing what parts of httpd's namespace may and may not be listed, respectively. Webls.denied is first searched to see if access is by default denied. If so webls.allowed is then searched to see if access is explicitly allowed. Thus one can have very general expressions in the denied list (like .*), yet still allow exceptions. If webls.denied does not exist or is unreadable, all accesses are assumed to be denied unless explicitly allowed in webls.allowed.
Other sites will note that if neither webls.denied nor webls.allowed exist, any portion of httpd's namespace can be listed (however, webls will always endeavor to prevent listing of `.' and `..'). If webls.allowed exists but webls.denied does not, any directory to be listed must be described by a regular expression in webls.allowed. Similarly, if webls.denied exists but webls.allowed does not, any directory to be listed must not be described by a regular expression in webls.denied. If both exist, a directory is listable if either it doesn't appear in webls.denied, or it appears in both webls.denied and webls.allowed. In other words, webls.allowed overrides webls.denied. If a listing for a directory is requested and access is denied, or another error occurs, a simple error page is returned.
A local redirection:
Redirection to another site:
Root directory for virtual host:
9srv Manual Collection/plan9/httpd(8) | Rev: Thu Jul 15 23:05:42 BST 2010 |