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