Blame


1 df45d696 2023-08-09 op .\" Copyright (c) 2023 Omar Polo <op@omarpolo.com>
2 df45d696 2023-08-09 op .\"
3 df45d696 2023-08-09 op .\" Permission to use, copy, modify, and distribute this software for any
4 df45d696 2023-08-09 op .\" purpose with or without fee is hereby granted, provided that the above
5 df45d696 2023-08-09 op .\" copyright notice and this permission notice appear in all copies.
6 df45d696 2023-08-09 op .\"
7 df45d696 2023-08-09 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 df45d696 2023-08-09 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 df45d696 2023-08-09 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 df45d696 2023-08-09 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 df45d696 2023-08-09 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 df45d696 2023-08-09 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 df45d696 2023-08-09 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 946cda4e 2024-01-08 op .Dd January 8, 2024
15 df45d696 2023-08-09 op .Dt PKG_FCGI 8
16 df45d696 2023-08-09 op .Os
17 df45d696 2023-08-09 op .Sh NAME
18 df45d696 2023-08-09 op .Nm pkg_fcgi
19 df45d696 2023-08-09 op .Nd FastCGI interface to browse the OpenBSD port tree
20 df45d696 2023-08-09 op .Sh SYNOPSIS
21 df45d696 2023-08-09 op .Nm
22 df45d696 2023-08-09 op .Op Fl dv
23 df45d696 2023-08-09 op .Op Fl j Ar n
24 df45d696 2023-08-09 op .Op Fl p Ar path
25 df45d696 2023-08-09 op .Op Fl s Ar socket
26 df45d696 2023-08-09 op .Op Fl u Ar user
27 df45d696 2023-08-09 op .Op Ar database
28 df45d696 2023-08-09 op .Sh DESCRIPTION
29 df45d696 2023-08-09 op .Nm
30 df45d696 2023-08-09 op is a FastCGI server that serves an interface to browse through and
31 df45d696 2023-08-09 op query the
32 df45d696 2023-08-09 op .Ox
33 df45d696 2023-08-09 op port tree from Gemini.
34 df45d696 2023-08-09 op .Pp
35 df45d696 2023-08-09 op It opens a socket at
36 df45d696 2023-08-09 op .Pa /var/www/run/pkg_fcgi.sock ,
37 df45d696 2023-08-09 op owned by www:www with permissions 0660.
38 df45d696 2023-08-09 op It will then
39 df45d696 2023-08-09 op .Xr chroot 8
40 df45d696 2023-08-09 op to
41 df45d696 2023-08-09 op .Pa /var/www
42 df45d696 2023-08-09 op and drop privileges to user
43 df45d696 2023-08-09 op .Dq www .
44 df45d696 2023-08-09 op Three child processes are ran to handle the incoming traffic on the
45 df45d696 2023-08-09 op FastCGI socket.
46 df45d696 2023-08-09 op Upon
47 df45d696 2023-08-09 op .Dv SIGHUP
48 df45d696 2023-08-09 op the database is closed and re-opened.
49 df45d696 2023-08-09 op The default database used is at
50 df45d696 2023-08-09 op .Pa /pkg_fcgi/pkgs.sqlite3
51 df45d696 2023-08-09 op inside the chroot.
52 df45d696 2023-08-09 op .Pp
53 df45d696 2023-08-09 op The options are as follows:
54 df45d696 2023-08-09 op .Bl -tag -width Ds
55 df45d696 2023-08-09 op .It Fl d
56 df45d696 2023-08-09 op Do not daemonize.
57 df45d696 2023-08-09 op If this option is specified,
58 df45d696 2023-08-09 op .Nm
59 df45d696 2023-08-09 op will run in the foreground and log to standard error.
60 df45d696 2023-08-09 op .It Fl j Ar n
61 df45d696 2023-08-09 op Run
62 df45d696 2023-08-09 op .Ar n
63 df45d696 2023-08-09 op child processes.
64 df45d696 2023-08-09 op .It Fl p Ar path
65 df45d696 2023-08-09 op .Xr chroot 2
66 df45d696 2023-08-09 op to
67 df45d696 2023-08-09 op .Ar path .
68 df45d696 2023-08-09 op A
69 df45d696 2023-08-09 op .Ar path
70 df45d696 2023-08-09 op of
71 df45d696 2023-08-09 op .Pa /
72 df45d696 2023-08-09 op effectively disables the chroot.
73 df45d696 2023-08-09 op .It Fl s Ar socket
74 df45d696 2023-08-09 op Create an bind to the local socket at
75 df45d696 2023-08-09 op .Ar socket .
76 df45d696 2023-08-09 op .It Fl u Ar user
77 df45d696 2023-08-09 op Drop privileges to
78 df45d696 2023-08-09 op .Ar user
79 df45d696 2023-08-09 op instead of default user www and
80 df45d696 2023-08-09 op .Xr chroot 8
81 df45d696 2023-08-09 op to their home directory.
82 df45d696 2023-08-09 op .It Fl v
83 df45d696 2023-08-09 op Enable more verbose (debug) logging.
84 df45d696 2023-08-09 op Multiple
85 df45d696 2023-08-09 op .Fl v
86 df45d696 2023-08-09 op options increase the verbosity.
87 df45d696 2023-08-09 op .El
88 df45d696 2023-08-09 op .Sh EXAMPLES
89 df45d696 2023-08-09 op Example configuration for
90 df45d696 2023-08-09 op .Xr gmid 8 :
91 df45d696 2023-08-09 op .Bd -literal -offset -indent
92 df45d696 2023-08-09 op server "localhost" {
93 df45d696 2023-08-09 op listen on *
94 df45d696 2023-08-09 op fastcgi socket "/run/pkg_fcgi.sock"
95 df45d696 2023-08-09 op }
96 df45d696 2023-08-09 op .Ed
97 df45d696 2023-08-09 op .Sh SEE ALSO
98 df45d696 2023-08-09 op .Xr gmid 8
99 df45d696 2023-08-09 op .Sh AUTHORS
100 946cda4e 2024-01-08 op .An Omar Polo Aq Mt op@omarpolo.com