xref: /openbsd-src/usr.sbin/slowcgi/slowcgi.8 (revision f2da64fbbbf1b03f09f390ab01267c93dfd77c4c)
1.\"   $OpenBSD: slowcgi.8,v 1.11 2014/08/28 08:09:39 jmc 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: August 28 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 p Ar path
27.Op Fl s Ar socket
28.Op Fl u Ar user
29.Sh DESCRIPTION
30.Nm
31is a server which implements the FastCGI Protocol to execute CGI scripts.
32FastCGI was designed to overcome the CGI protocol's scalability
33and resource sharing limitations.
34While CGI scripts need to be forked for every request, FastCGI scripts
35can be kept running and handle many HTTP requests.
36.Pp
37.Nm
38is a simple server that translates FastCGI requests to the CGI protocol.
39It executes the requested CGI script and translates its output back to the
40FastCGI protocol.
41.Pp
42Modern web frameworks and web applications usually come with the
43capability to run as FastCGI servers.
44.Nm
45is not intended for these applications.
46.Pp
47.Nm
48opens a socket at
49.Pa /var/www/run/slowcgi.sock ,
50owned by www:www,
51with permissions 0660.
52It will then
53.Xr chroot 8
54to
55.Pa /var/www
56and drop privileges to user
57.Qq www .
58.Pp
59The options are as follows:
60.Bl -tag -width Ds
61.It Fl d
62Do not daemonize.
63If this option is specified,
64.Nm
65will run in the foreground and log to stderr.
66.It Fl p Ar path
67.Xr chroot 2
68to
69.Ar path .
70A
71.Ar path
72of
73.Pa /
74effectively disables the chroot.
75.It Fl s Ar socket
76Create and bind to alternative local socket at
77.Ar socket .
78.It Fl u Ar user
79Drop privileges to
80.Ar user
81instead of default user www.
82.El
83.Sh SEE ALSO
84.Xr httpd 8
85.Sh STANDARDS
86.Rs
87.%A Mark R. Brown
88.%D April 1996
89.%T FastCGI Specification
90.Re
91.Pp
92.Rs
93.%A D. Robinson, K. Coar
94.%D October 2004
95.%R RFC 3875
96.%T The Common Gateway Interface (CGI) Version 1.1
97.Re
98.Sh BUGS
99.Nm
100only implements the parts of the FastCGI standard needed to execute
101CGI scripts.
102This is intentional.
103