comparison doc/manual.tex @ 1163:6c507826fae9

Tips for CGI scripts without httpd.conf access
author Adam Chlipala <adamc@hcoop.net>
date Tue, 09 Feb 2010 20:08:59 -0500
parents 2ae57fa551be
children 8679ba87cf3c
comparison
equal deleted inserted replaced
1162:24a62b6412c4 1163:6c507826fae9
217 217
218 Since Ur/Web treats paths in an unusual way, a configuration line like this one can be used to configure an application that was built with URL prefix \texttt{/Hello}: 218 Since Ur/Web treats paths in an unusual way, a configuration line like this one can be used to configure an application that was built with URL prefix \texttt{/Hello}:
219 \begin{verbatim} 219 \begin{verbatim}
220 ScriptAlias /Hello /path/to/hello.exe 220 ScriptAlias /Hello /path/to/hello.exe
221 \end{verbatim} 221 \end{verbatim}
222
223 A different method can be used for, e.g., a shared host, where you can only configure Apache via \texttt{.htaccess} files. Drop the generated executable into your web space and mark it as CGI somehow. For instance, if the script ends in \texttt{.exe}, you might put this in \texttt{.htaccess} in the directory containing the script:
224 \begin{verbatim}
225 Options +ExecCGI
226 AddHandler cgi-script .exe
227 \end{verbatim}
228
229 Additionally, make sure that Ur/Web knows the proper URI prefix for your script. For instance, if the script is accessed via \texttt{http://somewhere/dir/script.exe}, then include this line in your \texttt{.urp} file:
230 \begin{verbatim}
231 prefix /dir/script.exe/
232 \end{verbatim}
233
234 To access the \texttt{foo} function in the \texttt{Bar} module, you would then hit \texttt{http://somewhere/dir/script.exe/Bar/foo}.
222 235
223 \item \texttt{fastcgi}: This is a newer protocol inspired by CGI, wherein web servers can start and reuse persistent external processes to generate dynamic content. Ur/Web doesn't implement the whole protocol, but Ur/Web's support has been tested to work with the \texttt{mod\_fastcgi}s of Apache and lighttpd. 236 \item \texttt{fastcgi}: This is a newer protocol inspired by CGI, wherein web servers can start and reuse persistent external processes to generate dynamic content. Ur/Web doesn't implement the whole protocol, but Ur/Web's support has been tested to work with the \texttt{mod\_fastcgi}s of Apache and lighttpd.
224 237
225 To configure a FastCGI program with Apache, one could combine the above \texttt{ScriptAlias} line with a line like this: 238 To configure a FastCGI program with Apache, one could combine the above \texttt{ScriptAlias} line with a line like this:
226 \begin{verbatim} 239 \begin{verbatim}