2 a596b957 2022-07-14 tracey .\" Copyright (c) 2020 Stefan Sperling
4 a596b957 2022-07-14 tracey .\" Permission to use, copy, modify, and distribute this software for any
5 a596b957 2022-07-14 tracey .\" purpose with or without fee is hereby granted, provided that the above
6 a596b957 2022-07-14 tracey .\" copyright notice and this permission notice appear in all copies.
8 a596b957 2022-07-14 tracey .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 a596b957 2022-07-14 tracey .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 a596b957 2022-07-14 tracey .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 a596b957 2022-07-14 tracey .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 a596b957 2022-07-14 tracey .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 a596b957 2022-07-14 tracey .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 a596b957 2022-07-14 tracey .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 a596b957 2022-07-14 tracey .Dd $Mdocdate$
17 a596b957 2022-07-14 tracey .Dt GOTWEB 8
20 a596b957 2022-07-14 tracey .Nm gotweb
21 a596b957 2022-07-14 tracey .Nd Game of Trees Git repository server for web browsers -- which obviously
22 a596b957 2022-07-14 tracey needs to be updated to gotwebd
23 a596b957 2022-07-14 tracey .Sh SYNOPSIS
25 a596b957 2022-07-14 tracey .Sh DESCRIPTION
27 a596b957 2022-07-14 tracey provides a web interface allowing Git repository contents to be viewed
28 a596b957 2022-07-14 tracey with a web browser.
31 a596b957 2022-07-14 tracey is a CGI program based on
34 a596b957 2022-07-14 tracey .Xr kcgi 3
35 a596b957 2022-07-14 tracey which is intended to run in a
36 a596b957 2022-07-14 tracey .Xr chroot 2
37 a596b957 2022-07-14 tracey environment in
38 a596b957 2022-07-14 tracey .Pa /var/www .
39 a596b957 2022-07-14 tracey The program has been designed to work out of the box with
41 a596b957 2022-07-14 tracey .Xr httpd 8
42 a596b957 2022-07-14 tracey web server in conjunction with
43 a596b957 2022-07-14 tracey .Xr slowcgi 8 .
47 a596b957 2022-07-14 tracey requires the following steps:
51 a596b957 2022-07-14 tracey .Xr httpd.conf 5
52 a596b957 2022-07-14 tracey configuration file must be adjusted to run
54 a596b957 2022-07-14 tracey as a CGI program with
55 a596b957 2022-07-14 tracey .Xr slowcgi 8 .
57 a596b957 2022-07-14 tracey .Sx EXAMPLES
58 a596b957 2022-07-14 tracey section below contains an appropriate configuration file sample.
60 a596b957 2022-07-14 tracey httpd(8) and slowcgi(8) must be enabled and started:
61 a596b957 2022-07-14 tracey .Bd -literal -offset indent
62 a596b957 2022-07-14 tracey # rcctl enable httpd slowcgi
63 a596b957 2022-07-14 tracey # rcctl start httpd slowcgi
66 a596b957 2022-07-14 tracey Optionally, the run-time behaviour of
68 a596b957 2022-07-14 tracey can be configured via the
69 a596b957 2022-07-14 tracey .Xr gotweb.conf 5
70 a596b957 2022-07-14 tracey configuration file.
72 a596b957 2022-07-14 tracey Git repositories must be created at a suitable location inside the
73 a596b957 2022-07-14 tracey web server's
74 a596b957 2022-07-14 tracey .Xr chroot 2
75 a596b957 2022-07-14 tracey environment.
76 a596b957 2022-07-14 tracey These repositories should
78 a596b957 2022-07-14 tracey be writable by the user ID of the
79 a596b957 2022-07-14 tracey .Xr httpd 8
81 a596b957 2022-07-14 tracey The default location for repositories published by
84 a596b957 2022-07-14 tracey .Pa /var/www/got/public .
86 a596b957 2022-07-14 tracey Git repositories served by
88 a596b957 2022-07-14 tracey should be kept up-to-date with a mechanism such as
89 a596b957 2022-07-14 tracey .Cm got fetch ,
90 a596b957 2022-07-14 tracey .Xr git-fetch 1 ,
92 a596b957 2022-07-14 tracey .Xr rsync 1 ,
93 a596b957 2022-07-14 tracey scheduled by
94 a596b957 2022-07-14 tracey .Xr cron 8 .
97 a596b957 2022-07-14 tracey .Bl -tag -width /var/www/got/public/ -compact
98 a596b957 2022-07-14 tracey .It Pa /var/www/got/public/
99 a596b957 2022-07-14 tracey Default location for Git repositories served by
101 a596b957 2022-07-14 tracey This location can be adjusted in the
102 a596b957 2022-07-14 tracey .Xr gotweb.conf 5
103 a596b957 2022-07-14 tracey configuration file.
104 a596b957 2022-07-14 tracey .It Pa /var/www/cgi-bin/gotweb/gotweb
107 a596b957 2022-07-14 tracey CGI program, statically linked for use in a
108 a596b957 2022-07-14 tracey .Xr chroot 2
109 a596b957 2022-07-14 tracey environment.
110 a596b957 2022-07-14 tracey .It Pa /var/www/cgi-bin/gotweb/gw_tmpl/
111 a596b957 2022-07-14 tracey Directory for template files used by
113 a596b957 2022-07-14 tracey .It Pa /var/www/cgi-bin/gotweb/libexec/
114 a596b957 2022-07-14 tracey Directory containing statically linked
115 a596b957 2022-07-14 tracey .Xr got 1
116 a596b957 2022-07-14 tracey helper programs which are run by
118 a596b957 2022-07-14 tracey to read Git repositories.
119 a596b957 2022-07-14 tracey .It Pa /var/www/htdocs/gotweb/
120 a596b957 2022-07-14 tracey Directory containing HTML, CSS, and image files used by
122 a596b957 2022-07-14 tracey .It Pa /var/www/got/tmp/
123 a596b957 2022-07-14 tracey Directory for temporary files created by
126 a596b957 2022-07-14 tracey .Sh EXAMPLES
127 a596b957 2022-07-14 tracey Example configuration for httpd.conf:
128 a596b957 2022-07-14 tracey .Bd -literal -offset indent
130 a596b957 2022-07-14 tracey types { include "/usr/share/misc/mime.types" }
131 a596b957 2022-07-14 tracey server "gotweb.example.com" {
132 a596b957 2022-07-14 tracey listen on * port 80
133 a596b957 2022-07-14 tracey root "/htdocs/gotweb"
134 a596b957 2022-07-14 tracey location "/cgi-bin/*" {
138 a596b957 2022-07-14 tracey location "/*" {
139 a596b957 2022-07-14 tracey directory index "index.html"
143 a596b957 2022-07-14 tracey .Sh SEE ALSO
144 a596b957 2022-07-14 tracey .Xr got 1 ,
145 a596b957 2022-07-14 tracey .Xr kcgi 3 ,
146 a596b957 2022-07-14 tracey .Xr git-repository 5 ,
147 a596b957 2022-07-14 tracey .Xr gotweb.conf 5 ,
148 a596b957 2022-07-14 tracey .Xr httpd 8 ,
149 a596b957 2022-07-14 tracey .Xr slowcgi 8
150 a596b957 2022-07-14 tracey .Sh AUTHORS
151 a596b957 2022-07-14 tracey .An Tracey Emery Aq Mt tracey@traceyemery.net
152 a596b957 2022-07-14 tracey .An Stefan Sperling Aq Mt stsp@openbsd.org