Blame


1 9ae1b92d 2022-08-13 op .\" $OpenBSD: slowcgi.8,v 1.17 2022/08/06 17:11:36 op Exp $
2 9ae1b92d 2022-08-13 op .\"
3 9ae1b92d 2022-08-13 op .\" Copyright (c) 2013 Florian Obser <florian@openbsd.org>
4 9ae1b92d 2022-08-13 op .\"
5 9ae1b92d 2022-08-13 op .\" Permission to use, copy, modify, and distribute this software for any
6 9ae1b92d 2022-08-13 op .\" purpose with or without fee is hereby granted, provided that the above
7 9ae1b92d 2022-08-13 op .\" copyright notice and this permission notice appear in all copies.
8 9ae1b92d 2022-08-13 op .\"
9 9ae1b92d 2022-08-13 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 9ae1b92d 2022-08-13 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 9ae1b92d 2022-08-13 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 9ae1b92d 2022-08-13 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 9ae1b92d 2022-08-13 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 9ae1b92d 2022-08-13 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 9ae1b92d 2022-08-13 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 9ae1b92d 2022-08-13 op .\"
17 9ae1b92d 2022-08-13 op .Dd $Mdocdate: August 6 2022 $
18 9ae1b92d 2022-08-13 op .Dt SLOWCGI 8
19 9ae1b92d 2022-08-13 op .Os
20 9ae1b92d 2022-08-13 op .Sh NAME
21 9ae1b92d 2022-08-13 op .Nm slowcgi
22 9ae1b92d 2022-08-13 op .Nd a FastCGI to CGI wrapper server
23 9ae1b92d 2022-08-13 op .Sh SYNOPSIS
24 9ae1b92d 2022-08-13 op .Nm
25 9ae1b92d 2022-08-13 op .Op Fl dv
26 9ae1b92d 2022-08-13 op .Op Fl p Ar path
27 9ae1b92d 2022-08-13 op .Op Fl s Ar socket
28 9ae1b92d 2022-08-13 op .Op Fl t Ar timeout
29 9ae1b92d 2022-08-13 op .Op Fl U Ar user
30 9ae1b92d 2022-08-13 op .Op Fl u Ar user
31 9ae1b92d 2022-08-13 op .Sh DESCRIPTION
32 9ae1b92d 2022-08-13 op .Nm
33 9ae1b92d 2022-08-13 op is a server which implements the FastCGI Protocol to execute CGI scripts.
34 9ae1b92d 2022-08-13 op FastCGI was designed to overcome the CGI protocol's scalability
35 9ae1b92d 2022-08-13 op and resource sharing limitations.
36 9ae1b92d 2022-08-13 op While CGI scripts need to be forked for every request, FastCGI scripts
37 9ae1b92d 2022-08-13 op can be kept running and handle many HTTP requests.
38 9ae1b92d 2022-08-13 op .Pp
39 9ae1b92d 2022-08-13 op .Nm
40 9ae1b92d 2022-08-13 op is a simple server that translates FastCGI requests to the CGI protocol.
41 9ae1b92d 2022-08-13 op It executes the requested CGI script and translates its output back to the
42 9ae1b92d 2022-08-13 op FastCGI protocol.
43 9ae1b92d 2022-08-13 op .Pp
44 9ae1b92d 2022-08-13 op Modern web frameworks and web applications usually come with the
45 9ae1b92d 2022-08-13 op capability to run as FastCGI servers.
46 9ae1b92d 2022-08-13 op .Nm
47 9ae1b92d 2022-08-13 op is not intended for these applications.
48 9ae1b92d 2022-08-13 op .Pp
49 9ae1b92d 2022-08-13 op .Nm
50 9ae1b92d 2022-08-13 op opens a socket at
51 9ae1b92d 2022-08-13 op .Pa /var/www/run/slowcgi.sock ,
52 9ae1b92d 2022-08-13 op owned by www:www,
53 9ae1b92d 2022-08-13 op with permissions 0660.
54 9ae1b92d 2022-08-13 op It will then
55 9ae1b92d 2022-08-13 op .Xr chroot 8
56 9ae1b92d 2022-08-13 op to
57 9ae1b92d 2022-08-13 op .Pa /var/www
58 9ae1b92d 2022-08-13 op and drop privileges to user
59 9ae1b92d 2022-08-13 op .Qq www .
60 9ae1b92d 2022-08-13 op .Pp
61 9ae1b92d 2022-08-13 op The options are as follows:
62 9ae1b92d 2022-08-13 op .Bl -tag -width Ds
63 9ae1b92d 2022-08-13 op .It Fl d
64 9ae1b92d 2022-08-13 op Do not daemonize.
65 9ae1b92d 2022-08-13 op If this option is specified,
66 9ae1b92d 2022-08-13 op .Nm
67 9ae1b92d 2022-08-13 op will run in the foreground and log to stderr.
68 9ae1b92d 2022-08-13 op .It Fl p Ar path
69 9ae1b92d 2022-08-13 op .Xr chroot 2
70 9ae1b92d 2022-08-13 op to
71 9ae1b92d 2022-08-13 op .Ar path .
72 9ae1b92d 2022-08-13 op A
73 9ae1b92d 2022-08-13 op .Ar path
74 9ae1b92d 2022-08-13 op of
75 9ae1b92d 2022-08-13 op .Pa /
76 9ae1b92d 2022-08-13 op effectively disables the chroot.
77 9ae1b92d 2022-08-13 op .It Fl s Ar socket
78 9ae1b92d 2022-08-13 op Create and bind to alternative local socket at
79 9ae1b92d 2022-08-13 op .Ar socket .
80 9ae1b92d 2022-08-13 op .It Fl t Ar timeout
81 9ae1b92d 2022-08-13 op Terminate the request after
82 9ae1b92d 2022-08-13 op .Ar timeout
83 9ae1b92d 2022-08-13 op seconds instead of the default 120 seconds.
84 9ae1b92d 2022-08-13 op The CGI script is left to run but its standard input, output and error
85 9ae1b92d 2022-08-13 op will be closed.
86 9ae1b92d 2022-08-13 op .It Fl U Ar user
87 9ae1b92d 2022-08-13 op Change the owner of
88 9ae1b92d 2022-08-13 op .Pa /var/www/run/slowcgi.sock
89 9ae1b92d 2022-08-13 op to
90 9ae1b92d 2022-08-13 op .Ar user
91 9ae1b92d 2022-08-13 op and its primary group instead of the default www:www.
92 9ae1b92d 2022-08-13 op .It Fl u Ar user
93 9ae1b92d 2022-08-13 op Drop privileges to
94 9ae1b92d 2022-08-13 op .Ar user
95 9ae1b92d 2022-08-13 op instead of default user www and
96 9ae1b92d 2022-08-13 op .Xr chroot 8
97 9ae1b92d 2022-08-13 op to
98 9ae1b92d 2022-08-13 op the home directory of
99 9ae1b92d 2022-08-13 op .Ar user .
100 9ae1b92d 2022-08-13 op .It Fl v
101 9ae1b92d 2022-08-13 op Enable more verbose (debug) logging.
102 9ae1b92d 2022-08-13 op .El
103 9ae1b92d 2022-08-13 op .Sh SEE ALSO
104 9ae1b92d 2022-08-13 op .Xr httpd 8
105 9ae1b92d 2022-08-13 op .Sh STANDARDS
106 9ae1b92d 2022-08-13 op .Rs
107 9ae1b92d 2022-08-13 op .%A Mark R. Brown
108 9ae1b92d 2022-08-13 op .%D April 1996
109 9ae1b92d 2022-08-13 op .%T FastCGI Specification
110 9ae1b92d 2022-08-13 op .Re
111 9ae1b92d 2022-08-13 op .Pp
112 9ae1b92d 2022-08-13 op .Rs
113 9ae1b92d 2022-08-13 op .%A D. Robinson, K. Coar
114 9ae1b92d 2022-08-13 op .%D October 2004
115 9ae1b92d 2022-08-13 op .%R RFC 3875
116 9ae1b92d 2022-08-13 op .%T The Common Gateway Interface (CGI) Version 1.1
117 9ae1b92d 2022-08-13 op .Re
118 9ae1b92d 2022-08-13 op .Sh HISTORY
119 9ae1b92d 2022-08-13 op The
120 9ae1b92d 2022-08-13 op .Nm
121 9ae1b92d 2022-08-13 op server first appeared in
122 9ae1b92d 2022-08-13 op .Ox 5.4 .
123 9ae1b92d 2022-08-13 op .Sh AUTHORS
124 9ae1b92d 2022-08-13 op .An Florian Obser Aq Mt florian@openbsd.org
125 9ae1b92d 2022-08-13 op .Sh BUGS
126 9ae1b92d 2022-08-13 op .Nm
127 9ae1b92d 2022-08-13 op only implements the parts of the FastCGI standard needed to execute
128 9ae1b92d 2022-08-13 op CGI scripts.
129 9ae1b92d 2022-08-13 op This is intentional.