Blob


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