xref: /openbsd/usr.sbin/slowcgi/slowcgi.8 (revision 91f110e0)
1.\"   $OpenBSD: slowcgi.8,v 1.7 2014/01/20 13:00:31 florian Exp $
2.\"
3.\" Copyright (c) 2013 Florian Obser <florian@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: January 20 2014 $
18.Dt SLOWCGI 8
19.Os
20.Sh NAME
21.Nm slowcgi
22.Nd a FastCGI to CGI wrapper server
23.Sh SYNOPSIS
24.Nm
25.Op Fl d
26.Op Fl s Ar socket
27.Sh DESCRIPTION
28.Nm
29is a server which implements the FastCGI Protocol to execute CGI scripts.
30FastCGI was designed to overcome the CGI protocol's scalability
31and resource sharing limitations.
32While CGI scripts need to be forked for every request, FastCGI scripts
33can be kept running and handle many HTTP requests.
34.Pp
35.Xr nginx 8
36intentionally does not implement the CGI protocol.
37.Nm
38is a simple server that translates FastCGI requests coming from
39.Xr nginx 8
40to the CGI protocol.
41It executes the requested CGI script and translates its output back to the
42FastCGI protocol.
43.Pp
44Modern web frameworks and web applications usually come with the
45capability to run as FastCGI servers.
46.Nm
47is not intended for these applications.
48.Pp
49.Nm
50opens a socket at
51.Pa /var/www/run/slowcgi.sock ,
52owned by root:www,
53with permissions 0660.
54It will then
55.Xr chroot 8
56to
57.Pa /var/www
58and drop privileges to user
59.Qq www .
60.Pp
61The options are as follows:
62.Bl -tag -width Ds
63.It Fl d
64Do not daemonize.
65If this option is specified,
66.Nm
67will run in the foreground and log to stderr.
68.It Fl s Ar socket
69Create and bind to alternative local socket at
70.Ar socket .
71.El
72.\" .Sh SEE ALSO
73.Sh STANDARDS
74.Rs
75.%A Mark R. Brown
76.%D April 1996
77.%T FastCGI Specification
78.Re
79.Pp
80.Rs
81.%A D. Robinson, K. Coar
82.%D October 2004
83.%R RFC 3875
84.%T The Common Gateway Interface (CGI) Version 1.1
85.Re
86.Sh BUGS
87.Nm
88only implements the parts of the FastCGI standard needed to execute
89CGI scripts.
90This is intentional.
91