2 a596b957 2022-07-14 tracey .\" Copyright (c) 2020 Stefan Sperling
4 a596b957 2022-07-14 tracey .\" Permission to use, copy, modify, and distribute this software for any
5 a596b957 2022-07-14 tracey .\" purpose with or without fee is hereby granted, provided that the above
6 a596b957 2022-07-14 tracey .\" copyright notice and this permission notice appear in all copies.
8 a596b957 2022-07-14 tracey .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 a596b957 2022-07-14 tracey .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 a596b957 2022-07-14 tracey .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 a596b957 2022-07-14 tracey .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 a596b957 2022-07-14 tracey .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 a596b957 2022-07-14 tracey .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 a596b957 2022-07-14 tracey .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 a596b957 2022-07-14 tracey .Dd $Mdocdate$
17 59975c69 2022-08-29 stsp .Dt GOTWEBD 8
21 59975c69 2022-08-29 stsp .Nd Game of Trees Git Fast-CGI repository server for web browsers
22 a596b957 2022-07-14 tracey .Sh SYNOPSIS
24 a596b957 2022-07-14 tracey .Sh DESCRIPTION
26 59975c69 2022-08-29 stsp is a Fast-CGI server program which can display the contents of Git
27 59975c69 2022-08-29 stsp repositories via a web browser.
28 a596b957 2022-07-14 tracey The program has been designed to work out of the box with
30 a596b957 2022-07-14 tracey .Xr httpd 8
35 a596b957 2022-07-14 tracey requires the following steps:
39 a596b957 2022-07-14 tracey .Xr httpd.conf 5
40 a596b957 2022-07-14 tracey configuration file must be adjusted to run
42 59975c69 2022-08-29 stsp as a Fast-CGI helper program.
44 a596b957 2022-07-14 tracey .Sx EXAMPLES
45 a596b957 2022-07-14 tracey section below contains an appropriate configuration file sample.
47 59975c69 2022-08-29 stsp httpd(8) must be enabled and started:
48 a596b957 2022-07-14 tracey .Bd -literal -offset indent
49 59975c69 2022-08-29 stsp # rcctl enable httpd
50 59975c69 2022-08-29 stsp # rcctl start httpd
53 a596b957 2022-07-14 tracey Optionally, the run-time behaviour of
55 a596b957 2022-07-14 tracey can be configured via the
56 59975c69 2022-08-29 stsp .Xr gotwebd.conf 5
57 a596b957 2022-07-14 tracey configuration file.
59 a596b957 2022-07-14 tracey Git repositories must be created at a suitable location inside the
60 a596b957 2022-07-14 tracey web server's
61 a596b957 2022-07-14 tracey .Xr chroot 2
62 a596b957 2022-07-14 tracey environment.
63 a596b957 2022-07-14 tracey These repositories should
65 e4556f5a 2022-08-30 stsp be writable by the user ID shared between
68 e4556f5a 2022-08-30 stsp .Xr httpd 8 .
69 a596b957 2022-07-14 tracey The default location for repositories published by
72 a596b957 2022-07-14 tracey .Pa /var/www/got/public .
74 a596b957 2022-07-14 tracey Git repositories served by
76 a596b957 2022-07-14 tracey should be kept up-to-date with a mechanism such as
77 a596b957 2022-07-14 tracey .Cm got fetch ,
78 a596b957 2022-07-14 tracey .Xr git-fetch 1 ,
80 a596b957 2022-07-14 tracey .Xr rsync 1 ,
81 a596b957 2022-07-14 tracey scheduled by
82 a596b957 2022-07-14 tracey .Xr cron 8 .
85 a596b957 2022-07-14 tracey .Bl -tag -width /var/www/got/public/ -compact
86 a596b957 2022-07-14 tracey .It Pa /var/www/got/public/
87 a596b957 2022-07-14 tracey Default location for Git repositories served by
89 a596b957 2022-07-14 tracey This location can be adjusted in the
90 59975c69 2022-08-29 stsp .Xr gotwebd.conf 5
91 a596b957 2022-07-14 tracey configuration file.
92 59975c69 2022-08-29 stsp .It Pa /var/www/bin/gotwebd/
93 a596b957 2022-07-14 tracey Directory containing statically linked
95 a596b957 2022-07-14 tracey helper programs which are run by
97 a596b957 2022-07-14 tracey to read Git repositories.
98 59975c69 2022-08-29 stsp .It Pa /var/www/htdocs/gotwebd/
99 a596b957 2022-07-14 tracey Directory containing HTML, CSS, and image files used by
101 59975c69 2022-08-29 stsp .It Pa /tmp/
102 a596b957 2022-07-14 tracey Directory for temporary files created by
105 a596b957 2022-07-14 tracey .Sh EXAMPLES
106 a596b957 2022-07-14 tracey Example configuration for httpd.conf:
107 a596b957 2022-07-14 tracey .Bd -literal -offset indent
108 a596b957 2022-07-14 tracey types { include "/usr/share/misc/mime.types" }
110 dbcc187b 2022-08-30 stsp # one gotwebd reachable at http://gotweb1.example.com/
111 dbcc187b 2022-08-30 stsp server "gotweb1.example.com" {
112 dbcc187b 2022-08-30 stsp listen on * port 80
113 dbcc187b 2022-08-30 stsp root "/htdocs/gotwebd"
114 dbcc187b 2022-08-30 stsp location "/" {
115 dbcc187b 2022-08-30 stsp fastcgi socket tcp localhost 9000
119 dbcc187b 2022-08-30 stsp # hosting multiple gotwebd instances on the same HTTP server:
120 dbcc187b 2022-08-30 stsp # http://gotweb2.example.com/gotwebd-unix/
121 dbcc187b 2022-08-30 stsp # http://gotweb2.example.com/gotwebd-tcp/
122 dbcc187b 2022-08-30 stsp server "gotweb2.example.com" {
123 dbcc187b 2022-08-30 stsp listen on * port 80
124 dbcc187b 2022-08-30 stsp location "/gotwebd-unix/" {
125 59975c69 2022-08-29 stsp fastcgi socket "/run/gotweb.sock"
127 dbcc187b 2022-08-30 stsp location "/gotwebd-unix/*" {
128 dbcc187b 2022-08-30 stsp root "/htdocs/gotwebd"
129 dbcc187b 2022-08-30 stsp request strip 1
131 dbcc187b 2022-08-30 stsp location "/gotwebd-tcp/" {
132 59975c69 2022-08-29 stsp fastcgi socket tcp 127.0.0.1 9000
134 dbcc187b 2022-08-30 stsp location "/gotwebd-tcp/*" {
135 dbcc187b 2022-08-30 stsp root "/htdocs/gotwebd"
136 dbcc187b 2022-08-30 stsp request strip 1
140 a596b957 2022-07-14 tracey .Sh SEE ALSO
141 a596b957 2022-07-14 tracey .Xr got 1 ,
142 a596b957 2022-07-14 tracey .Xr git-repository 5 ,
143 59975c69 2022-08-29 stsp .Xr gotwebd.conf 5 ,
144 59975c69 2022-08-29 stsp .Xr httpd 8
145 a596b957 2022-07-14 tracey .Sh AUTHORS
146 59975c69 2022-08-29 stsp .An Omar Polo Aq Mt op@openbsd.org
147 a596b957 2022-07-14 tracey .An Stefan Sperling Aq Mt stsp@openbsd.org
148 59975c69 2022-08-29 stsp .An Tracey Emery Aq Mt tracey@traceyemery.net