doc: Fixed typo.
[ashd.git] / doc / callcgi.doc
CommitLineData
a7431959
FT
1callcgi(1)
2==========
3
4NAME
5----
6callcgi - CGI request handler for ashd(7)
7
8SYNOPSIS
9--------
10*callcgi* [*-c*] [*-p* 'PROGRAM'] 'METHOD' 'URL' 'REST'
11
12DESCRIPTION
13-----------
14
15*callcgi* serves CGI scripts by translating the *ashd*(7) request
16environment into a standard CGI environment and executing the target
17file. It needs to be called with the `X-Ash-File` header added to the
18request, as *dirplex*(1) does.
19
20*callcgi* is a transient handler, as defined in *ashd*(7), and the
21'METHOD', 'URL' and 'REST' arguments will normally be added by the
22parent handler.
23
24The CGI script is called with its own filename as the first and only
25command-line parameter.
26
27OPTIONS
28-------
29
30*-c*::
31
32 Change directory to the directory containing the CGI script
33 before running it. This behavior is encouraged by the CGI
34 specification, but is not used by *callcgi* by default.
35
36*-p* 'PROGRAM'::
37
38 Call 'PROGRAM' instead of the file itself. This mechanism can
39 be used to serve e.g. PHP scripts and other programs that have
40 an interpreter that can act as a CGI script. The filename of
41 the actual script is still passed as the first and only
42 command-line parameter to the program.
43
44AUTHOR
45------
46Fredrik Tolf <fredrik@dolda2000.com>
47
48SEE ALSO
49--------
16c2bec3 50*dirplex*(1), *ashd*(7), *callscgi*(1), *callfcgi*(1), RFC 3875