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 shared between
66 .Nm
67 and
68 .Xr httpd 8 .
69 The default location for repositories published by
70 .Nm
71 is
72 .Pa /var/www/got/public .
73 .It
74 Git repositories served by
75 .Nm
76 should be kept up-to-date with a mechanism such as
77 .Cm got fetch ,
78 .Xr git-fetch 1 ,
79 or
80 .Xr rsync 1 ,
81 scheduled by
82 .Xr cron 8 .
83 .El
84 .Sh FILES
85 .Bl -tag -width /var/www/got/public/ -compact
86 .It Pa /var/www/got/public/
87 Default location for Git repositories served by
88 .Nm .
89 This location can be adjusted in the
90 .Xr gotwebd.conf 5
91 configuration file.
92 .It Pa /var/www/bin/gotwebd/
93 Directory containing statically linked
94 .Xr got 1
95 helper programs which are run by
96 .Nm
97 to read Git repositories.
98 .It Pa /var/www/htdocs/gotwebd/
99 Directory containing HTML, CSS, and image files used by
100 .Nm .
101 .It Pa /tmp/
102 Directory for temporary files created by
103 .Nm .
104 .El
105 .Sh EXAMPLES
106 Example configuration for httpd.conf:
107 .Bd -literal -offset indent
108 types { include "/usr/share/misc/mime.types" }
110 # one gotwebd reachable at http://gotweb1.example.com/
111 server "gotweb1.example.com" {
112 listen on * port 80
113 root "/htdocs/gotwebd"
114 location "/" {
115 fastcgi socket tcp localhost 9000
119 # hosting multiple gotwebd instances on the same HTTP server:
120 # http://gotweb2.example.com/gotwebd-unix/
121 # http://gotweb2.example.com/gotwebd-tcp/
122 server "gotweb2.example.com" {
123 listen on * port 80
124 location "/gotwebd-unix/" {
125 fastcgi socket "/run/gotweb.sock"
127 location "/gotwebd-unix/*" {
128 root "/htdocs/gotwebd"
129 request strip 1
131 location "/gotwebd-tcp/" {
132 fastcgi socket tcp 127.0.0.1 9000
134 location "/gotwebd-tcp/*" {
135 root "/htdocs/gotwebd"
136 request strip 1
139 .Ed
140 .Sh SEE ALSO
141 .Xr got 1 ,
142 .Xr git-repository 5 ,
143 .Xr gotwebd.conf 5 ,
144 .Xr httpd 8
145 .Sh AUTHORS
146 .An Omar Polo Aq Mt op@openbsd.org
147 .An Stefan Sperling Aq Mt stsp@openbsd.org
148 .An Tracey Emery Aq Mt tracey@traceyemery.net