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 web interface allowing Git repository contents to be viewed
27 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 .Cm got fetch ,
89 .Xr git-fetch 1 ,
90 or
91 .Xr rsync 1 ,
92 scheduled by
93 .Xr cron 8 .
94 .El
95 .Sh FILES
96 .Bl -tag -width /var/www/got/public/ -compact
97 .It Pa /var/www/got/public/
98 Default location for Git repositories served by
99 .Nm .
100 This location can be adjusted in the
101 .Xr gotweb.conf 5
102 configuration file.
103 .It Pa /var/www/cgi-bin/gotweb/gotweb
104 The
105 .Nm
106 CGI program, statically linked for use in a
107 .Xr chroot 2
108 environment.
109 .It Pa /var/www/cgi-bin/gotweb/gw_tmpl/
110 Directory for template files used by
111 .Nm .
112 .It Pa /var/www/cgi-bin/gotweb/libexec/
113 Directory containing statically linked
114 .Xr got 1
115 helper programs which are run by
116 .Nm
117 to read Git repositories.
118 .It Pa /var/www/htdocs/gotweb/
119 Directory containing HTML, CSS, and image files used by
120 .Nm .
121 .It Pa /var/www/got/tmp/
122 Directory for temporary files created by
123 .Nm .
124 .El
125 .Sh EXAMPLES
126 Example configuration for httpd.conf:
127 .Bd -literal -offset indent
129 types { include "/usr/share/misc/mime.types" }
130 server "gotweb.example.com" {
131 listen on * port 80
132 root "/htdocs/gotweb"
133 location "/cgi-bin/*" {
134 root "/"
135 fastcgi
137 location "/*" {
138 directory index "index.html"
141 .Ed
142 .Sh SEE ALSO
143 .Xr got 1 ,
144 .Xr kcgi 3 ,
145 .Xr git-repository 5 ,
146 .Xr gotweb.conf 5 ,
147 .Xr httpd 8 ,
148 .Xr slowcgi 8
149 .Sh AUTHORS
150 .An Christian Weisgerber Aq Mt naddy@openbsd.org
151 .An Jerome Kasper Aq Mt neon.king.fr@gmail.com
152 .An Josh Rickmar Aq Mt jrick@zettaport.com
153 .An Omar Polo Aq Mt op@openbsd.org
154 .An Stefan Sperling Aq Mt stsp@openbsd.org
155 .An Tracey Emery Aq Mt tracey@traceyemery.net