Blame


1 8a35f56c 2022-07-16 thomas .\"
2 8a35f56c 2022-07-16 thomas .\" Copyright (c) 2020 Stefan Sperling
3 8a35f56c 2022-07-16 thomas .\"
4 8a35f56c 2022-07-16 thomas .\" Permission to use, copy, modify, and distribute this software for any
5 8a35f56c 2022-07-16 thomas .\" purpose with or without fee is hereby granted, provided that the above
6 8a35f56c 2022-07-16 thomas .\" copyright notice and this permission notice appear in all copies.
7 8a35f56c 2022-07-16 thomas .\"
8 8a35f56c 2022-07-16 thomas .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 8a35f56c 2022-07-16 thomas .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 8a35f56c 2022-07-16 thomas .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 8a35f56c 2022-07-16 thomas .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 8a35f56c 2022-07-16 thomas .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 8a35f56c 2022-07-16 thomas .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 8a35f56c 2022-07-16 thomas .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 8a35f56c 2022-07-16 thomas .\"
16 8a35f56c 2022-07-16 thomas .Dd $Mdocdate$
17 55331ef5 2022-08-30 thomas .Dt GOTWEBD 8
18 8a35f56c 2022-07-16 thomas .Os
19 8a35f56c 2022-07-16 thomas .Sh NAME
20 55331ef5 2022-08-30 thomas .Nm gotwebd
21 55331ef5 2022-08-30 thomas .Nd Game of Trees Git Fast-CGI repository server for web browsers
22 8a35f56c 2022-07-16 thomas .Sh SYNOPSIS
23 8a35f56c 2022-07-16 thomas .Nm
24 3e208fd9 2022-09-07 thomas .Op Fl dnv
25 3e208fd9 2022-09-07 thomas .Op Fl D Ar macro=value
26 3e208fd9 2022-09-07 thomas .Op Fl f Ar file
27 8a35f56c 2022-07-16 thomas .Sh DESCRIPTION
28 8a35f56c 2022-07-16 thomas .Nm
29 55331ef5 2022-08-30 thomas is a Fast-CGI server program which can display the contents of Git
30 55331ef5 2022-08-30 thomas repositories via a web browser.
31 8a35f56c 2022-07-16 thomas The program has been designed to work out of the box with
32 8a35f56c 2022-07-16 thomas the
33 8a35f56c 2022-07-16 thomas .Xr httpd 8
34 55331ef5 2022-08-30 thomas web server.
35 8a35f56c 2022-07-16 thomas .Pp
36 3e208fd9 2022-09-07 thomas .Nm
37 3e208fd9 2022-09-07 thomas provides the following options:
38 3e208fd9 2022-09-07 thomas .Bl -tag -width tenletters
39 3e208fd9 2022-09-07 thomas .It Fl d
40 3e208fd9 2022-09-07 thomas Do not daemonize and log to stderr.
41 3e208fd9 2022-09-07 thomas .It Fl D Ar macro=value
42 3e208fd9 2022-09-07 thomas Override the value of a macro used in the configuration file.
43 3e208fd9 2022-09-07 thomas .It Fl f Ar file
44 3e208fd9 2022-09-07 thomas Set the path to the configuration file.
45 3e208fd9 2022-09-07 thomas If not specified, the file
46 3e208fd9 2022-09-07 thomas .Pa /etc/gotwebd.conf
47 3e208fd9 2022-09-07 thomas will be used.
48 3e208fd9 2022-09-07 thomas .It Fl n
49 3e208fd9 2022-09-07 thomas Parse the configuration file, report errors if any, and exit.
50 3e208fd9 2022-09-07 thomas .It Fl v
51 3e208fd9 2022-09-07 thomas Verbose mode.
52 3e208fd9 2022-09-07 thomas Verbosity increases if this option is used multiple times.
53 3e208fd9 2022-09-07 thomas .El
54 3e208fd9 2022-09-07 thomas .Pp
55 8a35f56c 2022-07-16 thomas Enabling
56 8a35f56c 2022-07-16 thomas .Nm
57 8a35f56c 2022-07-16 thomas requires the following steps:
58 8a35f56c 2022-07-16 thomas .Bl -enum
59 8a35f56c 2022-07-16 thomas .It
60 8a35f56c 2022-07-16 thomas The
61 8a35f56c 2022-07-16 thomas .Xr httpd.conf 5
62 8a35f56c 2022-07-16 thomas configuration file must be adjusted to run
63 8a35f56c 2022-07-16 thomas .Nm
64 55331ef5 2022-08-30 thomas as a Fast-CGI helper program.
65 8a35f56c 2022-07-16 thomas The
66 8a35f56c 2022-07-16 thomas .Sx EXAMPLES
67 8a35f56c 2022-07-16 thomas section below contains an appropriate configuration file sample.
68 8a35f56c 2022-07-16 thomas .It
69 55331ef5 2022-08-30 thomas httpd(8) must be enabled and started:
70 8a35f56c 2022-07-16 thomas .Bd -literal -offset indent
71 55331ef5 2022-08-30 thomas # rcctl enable httpd
72 55331ef5 2022-08-30 thomas # rcctl start httpd
73 8a35f56c 2022-07-16 thomas .Ed
74 8a35f56c 2022-07-16 thomas .It
75 8a35f56c 2022-07-16 thomas Optionally, the run-time behaviour of
76 8a35f56c 2022-07-16 thomas .Nm
77 8a35f56c 2022-07-16 thomas can be configured via the
78 55331ef5 2022-08-30 thomas .Xr gotwebd.conf 5
79 8a35f56c 2022-07-16 thomas configuration file.
80 8a35f56c 2022-07-16 thomas .It
81 8a35f56c 2022-07-16 thomas Git repositories must be created at a suitable location inside the
82 8a35f56c 2022-07-16 thomas web server's
83 8a35f56c 2022-07-16 thomas .Xr chroot 2
84 8a35f56c 2022-07-16 thomas environment.
85 8a35f56c 2022-07-16 thomas These repositories should
86 8a35f56c 2022-07-16 thomas .Em not
87 116aeeba 2022-08-30 thomas be writable by the user ID shared between
88 116aeeba 2022-08-30 thomas .Nm
89 116aeeba 2022-08-30 thomas and
90 116aeeba 2022-08-30 thomas .Xr httpd 8 .
91 8a35f56c 2022-07-16 thomas The default location for repositories published by
92 8a35f56c 2022-07-16 thomas .Nm
93 8a35f56c 2022-07-16 thomas is
94 8a35f56c 2022-07-16 thomas .Pa /var/www/got/public .
95 8a35f56c 2022-07-16 thomas .It
96 8a35f56c 2022-07-16 thomas Git repositories served by
97 8a35f56c 2022-07-16 thomas .Nm
98 8a35f56c 2022-07-16 thomas should be kept up-to-date with a mechanism such as
99 8a35f56c 2022-07-16 thomas .Cm got fetch ,
100 8a35f56c 2022-07-16 thomas .Xr git-fetch 1 ,
101 8a35f56c 2022-07-16 thomas or
102 8a35f56c 2022-07-16 thomas .Xr rsync 1 ,
103 8a35f56c 2022-07-16 thomas scheduled by
104 8a35f56c 2022-07-16 thomas .Xr cron 8 .
105 8a35f56c 2022-07-16 thomas .El
106 8a35f56c 2022-07-16 thomas .Sh FILES
107 8a35f56c 2022-07-16 thomas .Bl -tag -width /var/www/got/public/ -compact
108 380f0955 2022-09-07 thomas .It Pa /etc/gotwebd.conf
109 380f0955 2022-09-07 thomas Default location of the
110 380f0955 2022-09-07 thomas .Xr gotwebd.conf 5
111 380f0955 2022-09-07 thomas configuration file.
112 8a35f56c 2022-07-16 thomas .It Pa /var/www/got/public/
113 8a35f56c 2022-07-16 thomas Default location for Git repositories served by
114 8a35f56c 2022-07-16 thomas .Nm .
115 8a35f56c 2022-07-16 thomas This location can be adjusted in the
116 55331ef5 2022-08-30 thomas .Xr gotwebd.conf 5
117 8a35f56c 2022-07-16 thomas configuration file.
118 55331ef5 2022-08-30 thomas .It Pa /var/www/bin/gotwebd/
119 8a35f56c 2022-07-16 thomas Directory containing statically linked
120 8a35f56c 2022-07-16 thomas .Xr got 1
121 8a35f56c 2022-07-16 thomas helper programs which are run by
122 8a35f56c 2022-07-16 thomas .Nm
123 8a35f56c 2022-07-16 thomas to read Git repositories.
124 55331ef5 2022-08-30 thomas .It Pa /var/www/htdocs/gotwebd/
125 8a35f56c 2022-07-16 thomas Directory containing HTML, CSS, and image files used by
126 8a35f56c 2022-07-16 thomas .Nm .
127 55331ef5 2022-08-30 thomas .It Pa /tmp/
128 8a35f56c 2022-07-16 thomas Directory for temporary files created by
129 8a35f56c 2022-07-16 thomas .Nm .
130 8a35f56c 2022-07-16 thomas .El
131 8a35f56c 2022-07-16 thomas .Sh EXAMPLES
132 c0db90e8 2022-09-07 thomas Example configuration for
133 c0db90e8 2022-09-07 thomas .Xr httpd.conf 5 :
134 8a35f56c 2022-07-16 thomas .Bd -literal -offset indent
135 8a35f56c 2022-07-16 thomas types { include "/usr/share/misc/mime.types" }
136 ab451195 2022-08-30 thomas
137 ab451195 2022-08-30 thomas # one gotwebd reachable at http://gotweb1.example.com/
138 ab451195 2022-08-30 thomas server "gotweb1.example.com" {
139 ab451195 2022-08-30 thomas listen on * port 80
140 ab451195 2022-08-30 thomas root "/htdocs/gotwebd"
141 ab451195 2022-08-30 thomas location "/" {
142 ab451195 2022-08-30 thomas fastcgi socket tcp localhost 9000
143 ab451195 2022-08-30 thomas }
144 ab451195 2022-08-30 thomas }
145 ab451195 2022-08-30 thomas
146 ab451195 2022-08-30 thomas # hosting multiple gotwebd instances on the same HTTP server:
147 ab451195 2022-08-30 thomas # http://gotweb2.example.com/gotwebd-unix/
148 ab451195 2022-08-30 thomas # http://gotweb2.example.com/gotwebd-tcp/
149 ab451195 2022-08-30 thomas server "gotweb2.example.com" {
150 ab451195 2022-08-30 thomas listen on * port 80
151 ab451195 2022-08-30 thomas location "/gotwebd-unix/" {
152 55331ef5 2022-08-30 thomas fastcgi socket "/run/gotweb.sock"
153 55331ef5 2022-08-30 thomas }
154 ab451195 2022-08-30 thomas location "/gotwebd-unix/*" {
155 ab451195 2022-08-30 thomas root "/htdocs/gotwebd"
156 ab451195 2022-08-30 thomas request strip 1
157 ab451195 2022-08-30 thomas }
158 ab451195 2022-08-30 thomas location "/gotwebd-tcp/" {
159 55331ef5 2022-08-30 thomas fastcgi socket tcp 127.0.0.1 9000
160 55331ef5 2022-08-30 thomas }
161 ab451195 2022-08-30 thomas location "/gotwebd-tcp/*" {
162 ab451195 2022-08-30 thomas root "/htdocs/gotwebd"
163 ab451195 2022-08-30 thomas request strip 1
164 55331ef5 2022-08-30 thomas }
165 8a35f56c 2022-07-16 thomas }
166 8a35f56c 2022-07-16 thomas .Ed
167 8a35f56c 2022-07-16 thomas .Sh SEE ALSO
168 8a35f56c 2022-07-16 thomas .Xr got 1 ,
169 8a35f56c 2022-07-16 thomas .Xr git-repository 5 ,
170 55331ef5 2022-08-30 thomas .Xr gotwebd.conf 5 ,
171 c0db90e8 2022-09-07 thomas .Xr http.conf 5 ,
172 55331ef5 2022-08-30 thomas .Xr httpd 8
173 8a35f56c 2022-07-16 thomas .Sh AUTHORS
174 55331ef5 2022-08-30 thomas .An Omar Polo Aq Mt op@openbsd.org
175 8a35f56c 2022-07-16 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org
176 55331ef5 2022-08-30 thomas .An Tracey Emery Aq Mt tracey@traceyemery.net