Mercurial > urweb
changeset 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 | 24a62b6412c4 |
children | 8679ba87cf3c |
files | doc/manual.tex |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/manual.tex Tue Feb 09 17:00:31 2010 -0500 +++ b/doc/manual.tex Tue Feb 09 20:08:59 2010 -0500 @@ -220,6 +220,19 @@ ScriptAlias /Hello /path/to/hello.exe \end{verbatim} + 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: + \begin{verbatim} +Options +ExecCGI +AddHandler cgi-script .exe + \end{verbatim} + + 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: + \begin{verbatim} +prefix /dir/script.exe/ + \end{verbatim} + + To access the \texttt{foo} function in the \texttt{Bar} module, you would then hit \texttt{http://somewhere/dir/script.exe/Bar/foo}. + \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. To configure a FastCGI program with Apache, one could combine the above \texttt{ScriptAlias} line with a line like this: