Updated description of httpd (use httpd-options instead of proc-arguments)
This commit is contained in:
parent
0181574504
commit
0f77fb4b10
|
@ -1,8 +1,8 @@
|
|||
\section{HTTP server}\label{sec:httpd}
|
||||
%
|
||||
\begin{description}
|
||||
\item[Used files:] httpd-core.scm, httpd-handlers.scm,
|
||||
\item[Name of the package:] httpd-core, httpd-basic-handler
|
||||
\item[Used files:] httpd-core.scm, httpd-handlers.scm, httpd-options.scm
|
||||
\item[Name of the package:] httpd-core, httpd-basic-handler, httpd-make-options
|
||||
\end{description}
|
||||
%
|
||||
|
||||
|
@ -68,13 +68,39 @@ The server was designed with three principle goals in mind:
|
|||
\subsubsection*{Basic server structure}
|
||||
|
||||
The Web server is started by calling the httpd procedure, which takes
|
||||
one required and two optional arguments:
|
||||
one argument, a \ex{httpd\=options}-record:
|
||||
|
||||
\defun{httpd}{path-handler \ovar{port working-directory}}{\noreturn}
|
||||
\defun{httpd}{options}{\noreturn}
|
||||
\begin{desc}
|
||||
The server accepts connections from the given \semvar{port}, which
|
||||
defaults to 80. The server runs with the \semvar{working-directory} set to
|
||||
the given value, which defaults to \ex{/usr/local/etc/httpd}.
|
||||
The \semvar{options} can be set via the various options-transformers
|
||||
that can be found in the \ex{httpd\=make\=options}-structure:
|
||||
\ex{with\=port}, \ex{with\=root\=directory}, \ex{with\=fqdn},
|
||||
\ex{with\=reported-port}, \ex{with\=path\=handler},
|
||||
\ex{with\=server\=admin}, \ex{with\=simultaneous-requests}, that set
|
||||
the port the server is listening to, the root-directory of the
|
||||
server, the FQDN of the server, the reported-port \FIXME{What does
|
||||
reported-port do?}, the path-handler of the server (see below),
|
||||
the mail-address of the server-admin and the maximum number of
|
||||
simultaneous handled requests. The port defaults to 80, the root
|
||||
directory defaults to ``\ex{/}'' and the mail address of the
|
||||
server-admin defaults to
|
||||
``\ex{sperber@\ob{}informatik.\ob{}uni\=tuebingen.\ob{}de}''.
|
||||
\FIXME{Why does the server admin mail address have
|
||||
sperber@informatik... as default value?}All other options default
|
||||
to \sharpf.
|
||||
|
||||
For example
|
||||
\begin{code}
|
||||
(httpd (with-path-handler
|
||||
(rooted-file-handler "/usr/local/etc/httpd")
|
||||
(with-root-directory "/usr/local/etc/httpd")))
|
||||
\end{code}
|
||||
|
||||
starts the server on port 80 with
|
||||
``\ex{/usr/\ob{}local/\ob{}etc/\ob{}httpd}'' as root directory and
|
||||
let it serve any files out from this directory. Note that
|
||||
\ex{with\=root\=directory} is nested in \ex{with\=path\=handler}.
|
||||
|
||||
|
||||
The server's basic loop is to wait on the port for a connection from
|
||||
an HTTP client. When it receives a connection, it reads in and
|
||||
|
|
Loading…
Reference in New Issue