2 8a35f56c 2022-07-16 thomas .\" Copyright (c) 2020 Stefan Sperling
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.
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.
16 8a35f56c 2022-07-16 thomas .Dd $Mdocdate$
17 8a35f56c 2022-07-16 thomas .Dt GOTWEB 8
20 8a35f56c 2022-07-16 thomas .Nm gotweb
21 8a35f56c 2022-07-16 thomas .Nd Game of Trees Git repository server for web browsers -- which obviously
22 8a35f56c 2022-07-16 thomas needs to be updated to gotwebd
23 8a35f56c 2022-07-16 thomas .Sh SYNOPSIS
25 8a35f56c 2022-07-16 thomas .Sh DESCRIPTION
27 8a35f56c 2022-07-16 thomas provides a web interface allowing Git repository contents to be viewed
28 8a35f56c 2022-07-16 thomas with a web browser.
31 8a35f56c 2022-07-16 thomas is a CGI program based on
34 8a35f56c 2022-07-16 thomas .Xr kcgi 3
35 8a35f56c 2022-07-16 thomas which is intended to run in a
36 8a35f56c 2022-07-16 thomas .Xr chroot 2
37 8a35f56c 2022-07-16 thomas environment in
38 8a35f56c 2022-07-16 thomas .Pa /var/www .
39 8a35f56c 2022-07-16 thomas The program has been designed to work out of the box with
41 8a35f56c 2022-07-16 thomas .Xr httpd 8
42 8a35f56c 2022-07-16 thomas web server in conjunction with
43 8a35f56c 2022-07-16 thomas .Xr slowcgi 8 .
47 8a35f56c 2022-07-16 thomas requires the following steps:
51 8a35f56c 2022-07-16 thomas .Xr httpd.conf 5
52 8a35f56c 2022-07-16 thomas configuration file must be adjusted to run
54 8a35f56c 2022-07-16 thomas as a CGI program with
55 8a35f56c 2022-07-16 thomas .Xr slowcgi 8 .
57 8a35f56c 2022-07-16 thomas .Sx EXAMPLES
58 8a35f56c 2022-07-16 thomas section below contains an appropriate configuration file sample.
60 8a35f56c 2022-07-16 thomas httpd(8) and slowcgi(8) must be enabled and started:
61 8a35f56c 2022-07-16 thomas .Bd -literal -offset indent
62 8a35f56c 2022-07-16 thomas # rcctl enable httpd slowcgi
63 8a35f56c 2022-07-16 thomas # rcctl start httpd slowcgi
66 8a35f56c 2022-07-16 thomas Optionally, the run-time behaviour of
68 8a35f56c 2022-07-16 thomas can be configured via the
69 8a35f56c 2022-07-16 thomas .Xr gotweb.conf 5
70 8a35f56c 2022-07-16 thomas configuration file.
72 8a35f56c 2022-07-16 thomas Git repositories must be created at a suitable location inside the
73 8a35f56c 2022-07-16 thomas web server's
74 8a35f56c 2022-07-16 thomas .Xr chroot 2
75 8a35f56c 2022-07-16 thomas environment.
76 8a35f56c 2022-07-16 thomas These repositories should
78 8a35f56c 2022-07-16 thomas be writable by the user ID of the
79 8a35f56c 2022-07-16 thomas .Xr httpd 8
81 8a35f56c 2022-07-16 thomas The default location for repositories published by
84 8a35f56c 2022-07-16 thomas .Pa /var/www/got/public .
86 8a35f56c 2022-07-16 thomas Git repositories served by
88 8a35f56c 2022-07-16 thomas should be kept up-to-date with a mechanism such as
89 8a35f56c 2022-07-16 thomas .Cm got fetch ,
90 8a35f56c 2022-07-16 thomas .Xr git-fetch 1 ,
92 8a35f56c 2022-07-16 thomas .Xr rsync 1 ,
93 8a35f56c 2022-07-16 thomas scheduled by
94 8a35f56c 2022-07-16 thomas .Xr cron 8 .
97 8a35f56c 2022-07-16 thomas .Bl -tag -width /var/www/got/public/ -compact
98 8a35f56c 2022-07-16 thomas .It Pa /var/www/got/public/
99 8a35f56c 2022-07-16 thomas Default location for Git repositories served by
101 8a35f56c 2022-07-16 thomas This location can be adjusted in the
102 8a35f56c 2022-07-16 thomas .Xr gotweb.conf 5
103 8a35f56c 2022-07-16 thomas configuration file.
104 8a35f56c 2022-07-16 thomas .It Pa /var/www/cgi-bin/gotweb/gotweb
107 8a35f56c 2022-07-16 thomas CGI program, statically linked for use in a
108 8a35f56c 2022-07-16 thomas .Xr chroot 2
109 8a35f56c 2022-07-16 thomas environment.
110 8a35f56c 2022-07-16 thomas .It Pa /var/www/cgi-bin/gotweb/gw_tmpl/
111 8a35f56c 2022-07-16 thomas Directory for template files used by
113 8a35f56c 2022-07-16 thomas .It Pa /var/www/cgi-bin/gotweb/libexec/
114 8a35f56c 2022-07-16 thomas Directory containing statically linked
115 8a35f56c 2022-07-16 thomas .Xr got 1
116 8a35f56c 2022-07-16 thomas helper programs which are run by
118 8a35f56c 2022-07-16 thomas to read Git repositories.
119 8a35f56c 2022-07-16 thomas .It Pa /var/www/htdocs/gotweb/
120 8a35f56c 2022-07-16 thomas Directory containing HTML, CSS, and image files used by
122 8a35f56c 2022-07-16 thomas .It Pa /var/www/got/tmp/
123 8a35f56c 2022-07-16 thomas Directory for temporary files created by
126 8a35f56c 2022-07-16 thomas .Sh EXAMPLES
127 8a35f56c 2022-07-16 thomas Example configuration for httpd.conf:
128 8a35f56c 2022-07-16 thomas .Bd -literal -offset indent
130 8a35f56c 2022-07-16 thomas types { include "/usr/share/misc/mime.types" }
131 8a35f56c 2022-07-16 thomas server "gotweb.example.com" {
132 8a35f56c 2022-07-16 thomas listen on * port 80
133 8a35f56c 2022-07-16 thomas root "/htdocs/gotweb"
134 8a35f56c 2022-07-16 thomas location "/cgi-bin/*" {
138 8a35f56c 2022-07-16 thomas location "/*" {
139 8a35f56c 2022-07-16 thomas directory index "index.html"
143 8a35f56c 2022-07-16 thomas .Sh SEE ALSO
144 8a35f56c 2022-07-16 thomas .Xr got 1 ,
145 8a35f56c 2022-07-16 thomas .Xr kcgi 3 ,
146 8a35f56c 2022-07-16 thomas .Xr git-repository 5 ,
147 8a35f56c 2022-07-16 thomas .Xr gotweb.conf 5 ,
148 8a35f56c 2022-07-16 thomas .Xr httpd 8 ,
149 8a35f56c 2022-07-16 thomas .Xr slowcgi 8
150 8a35f56c 2022-07-16 thomas .Sh AUTHORS
151 8a35f56c 2022-07-16 thomas .An Tracey Emery Aq Mt tracey@traceyemery.net
152 8a35f56c 2022-07-16 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org