comparison doc/manual.tex @ 1753:957168662198

Clarify need for 'prefix' for FastCGI
author Adam Chlipala <adam@chlipala.net>
date Sun, 06 May 2012 15:34:10 -0400
parents 675ce534e3ec
children f69174d0abc0
comparison
equal deleted inserted replaced
1752:675ce534e3ec 1753:957168662198
263 263
264 \item \texttt{-path NAME VALUE}: Set the value of path variable \texttt{\$NAME} to \texttt{VALUE}, for use in \texttt{.urp} files. 264 \item \texttt{-path NAME VALUE}: Set the value of path variable \texttt{\$NAME} to \texttt{VALUE}, for use in \texttt{.urp} files.
265 265
266 \item \texttt{-prefix PREFIX}: Equivalent to the \texttt{prefix} directive from \texttt{.urp} files 266 \item \texttt{-prefix PREFIX}: Equivalent to the \texttt{prefix} directive from \texttt{.urp} files
267 267
268 \item \texttt{-protocol [http|cgi|fastcgi]}: Set the protocol that the generated application speaks. 268 \item \texttt{-protocol [http|cgi|fastcgi|static]}: Set the protocol that the generated application speaks.
269 \begin{itemize} 269 \begin{itemize}
270 \item \texttt{http}: This is the default. It is for building standalone web servers that can be accessed by web browsers directly. 270 \item \texttt{http}: This is the default. It is for building standalone web servers that can be accessed by web browsers directly.
271 271
272 \item \texttt{cgi}: This is the classic protocol that web servers use to generate dynamic content by spawning new processes. While Ur/Web programs may in general use message-passing with the \texttt{send} and \texttt{recv} functions, that functionality is not yet supported in CGI, since CGI needs a fresh process for each request, and message-passing needs to use persistent sockets to deliver messages. 272 \item \texttt{cgi}: This is the classic protocol that web servers use to generate dynamic content by spawning new processes. While Ur/Web programs may in general use message-passing with the \texttt{send} and \texttt{recv} functions, that functionality is not yet supported in CGI, since CGI needs a fresh process for each request, and message-passing needs to use persistent sockets to deliver messages.
273 273
296 To configure a FastCGI program with Apache, one could combine the above \texttt{ScriptAlias} line with a line like this: 296 To configure a FastCGI program with Apache, one could combine the above \texttt{ScriptAlias} line with a line like this:
297 \begin{verbatim} 297 \begin{verbatim}
298 FastCgiServer /path/to/hello.exe -idle-timeout 99999 298 FastCgiServer /path/to/hello.exe -idle-timeout 99999
299 \end{verbatim} 299 \end{verbatim}
300 The idle timeout is only important for applications that use message-passing. Client connections may go long periods without receiving messages, and Apache tries to be helpful and garbage collect them in such cases. To prevent that behavior, we specify how long a connection must be idle to be collected. 300 The idle timeout is only important for applications that use message-passing. Client connections may go long periods without receiving messages, and Apache tries to be helpful and garbage collect them in such cases. To prevent that behavior, we specify how long a connection must be idle to be collected.
301
302 Also see the discussion of the \cd{prefix} directive for CGI above; similar configuration is likely to be necessary for FastCGI. An Ur/Web application won't generally run correctly if it doesn't have a unique URI prefix assigned to it and configured with \cd{prefix}.
301 303
302 Here is some lighttpd configuration for the same application. 304 Here is some lighttpd configuration for the same application.
303 \begin{verbatim} 305 \begin{verbatim}
304 fastcgi.server = ( 306 fastcgi.server = (
305 "/Hello/" => 307 "/Hello/" =>