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