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 789899c8 2022-10-24 stsp .Nd Game of Trees Git FastCGI repository server for web browsers
22 a596b957 2022-07-14 tracey .Sh SYNOPSIS
25 47b307cd 2022-10-02 op .Op Fl D Ar macro Ns = Ns Ar value
26 7de33ce2 2022-09-07 stsp .Op Fl f Ar file
27 a596b957 2022-07-14 tracey .Sh DESCRIPTION
29 789899c8 2022-10-24 stsp is a FastCGI server program which can display the contents of Git
30 59975c69 2022-08-29 stsp repositories via a web browser.
31 a596b957 2022-07-14 tracey The program has been designed to work out of the box with
33 a596b957 2022-07-14 tracey .Xr httpd 8
37 7de33ce2 2022-09-07 stsp provides the following options:
38 7de33ce2 2022-09-07 stsp .Bl -tag -width tenletters
40 a164ea70 2023-01-18 stsp Do not daemonize. Send log output to stderr.
41 47b307cd 2022-10-02 op .It Fl D Ar macro Ns = Ns Ar value
46 47b307cd 2022-10-02 op Overrides the definition of
48 47b307cd 2022-10-02 op in the configuration file.
49 7de33ce2 2022-09-07 stsp .It Fl f Ar file
50 7de33ce2 2022-09-07 stsp Set the path to the configuration file.
51 7de33ce2 2022-09-07 stsp If not specified, the file
52 7de33ce2 2022-09-07 stsp .Pa /etc/gotwebd.conf
53 7de33ce2 2022-09-07 stsp will be used.
55 7de33ce2 2022-09-07 stsp Parse the configuration file, report errors if any, and exit.
57 7de33ce2 2022-09-07 stsp Verbose mode.
58 7de33ce2 2022-09-07 stsp Verbosity increases if this option is used multiple times.
63 a596b957 2022-07-14 tracey requires the following steps:
67 a596b957 2022-07-14 tracey .Xr httpd.conf 5
68 a596b957 2022-07-14 tracey configuration file must be adjusted to run
70 789899c8 2022-10-24 stsp as a FastCGI helper program.
72 a596b957 2022-07-14 tracey .Sx EXAMPLES
73 a596b957 2022-07-14 tracey section below contains an appropriate configuration file sample.
75 59975c69 2022-08-29 stsp httpd(8) must be enabled and started:
76 a596b957 2022-07-14 tracey .Bd -literal -offset indent
77 59975c69 2022-08-29 stsp # rcctl enable httpd
78 59975c69 2022-08-29 stsp # rcctl start httpd
81 a596b957 2022-07-14 tracey Optionally, the run-time behaviour of
83 a596b957 2022-07-14 tracey can be configured via the
84 59975c69 2022-08-29 stsp .Xr gotwebd.conf 5
85 a596b957 2022-07-14 tracey configuration file.
87 a596b957 2022-07-14 tracey Git repositories must be created at a suitable location inside the
88 a596b957 2022-07-14 tracey web server's
89 a596b957 2022-07-14 tracey .Xr chroot 2
90 a596b957 2022-07-14 tracey environment.
91 a596b957 2022-07-14 tracey These repositories should
93 e4556f5a 2022-08-30 stsp be writable by the user ID shared between
96 e4556f5a 2022-08-30 stsp .Xr httpd 8 .
97 a596b957 2022-07-14 tracey The default location for repositories published by
100 a596b957 2022-07-14 tracey .Pa /var/www/got/public .
102 a596b957 2022-07-14 tracey Git repositories served by
104 a596b957 2022-07-14 tracey should be kept up-to-date with a mechanism such as
105 a596b957 2022-07-14 tracey .Cm got fetch ,
106 a596b957 2022-07-14 tracey .Xr git-fetch 1 ,
108 a596b957 2022-07-14 tracey .Xr rsync 1 ,
109 a596b957 2022-07-14 tracey scheduled by
110 a596b957 2022-07-14 tracey .Xr cron 8 .
112 a596b957 2022-07-14 tracey .Sh FILES
113 a596b957 2022-07-14 tracey .Bl -tag -width /var/www/got/public/ -compact
114 7e8fc9b5 2022-09-07 stsp .It Pa /etc/gotwebd.conf
115 7e8fc9b5 2022-09-07 stsp Default location of the
116 7e8fc9b5 2022-09-07 stsp .Xr gotwebd.conf 5
117 7e8fc9b5 2022-09-07 stsp configuration file.
118 a596b957 2022-07-14 tracey .It Pa /var/www/got/public/
119 a596b957 2022-07-14 tracey Default location for Git repositories served by
121 a596b957 2022-07-14 tracey This location can be adjusted in the
122 59975c69 2022-08-29 stsp .Xr gotwebd.conf 5
123 a596b957 2022-07-14 tracey configuration file.
124 59975c69 2022-08-29 stsp .It Pa /var/www/bin/gotwebd/
125 a596b957 2022-07-14 tracey Directory containing statically linked
126 a596b957 2022-07-14 tracey .Xr got 1
127 a596b957 2022-07-14 tracey helper programs which are run by
129 a596b957 2022-07-14 tracey to read Git repositories.
130 59975c69 2022-08-29 stsp .It Pa /var/www/htdocs/gotwebd/
131 a596b957 2022-07-14 tracey Directory containing HTML, CSS, and image files used by
133 59975c69 2022-08-29 stsp .It Pa /tmp/
134 a596b957 2022-07-14 tracey Directory for temporary files created by
137 a596b957 2022-07-14 tracey .Sh EXAMPLES
138 41d6d08a 2022-09-07 stsp Example configuration for
139 41d6d08a 2022-09-07 stsp .Xr httpd.conf 5 :
140 a596b957 2022-07-14 tracey .Bd -literal -offset indent
141 a596b957 2022-07-14 tracey types { include "/usr/share/misc/mime.types" }
143 dbcc187b 2022-08-30 stsp # one gotwebd reachable at http://gotweb1.example.com/
144 dbcc187b 2022-08-30 stsp server "gotweb1.example.com" {
145 dbcc187b 2022-08-30 stsp listen on * port 80
146 dbcc187b 2022-08-30 stsp root "/htdocs/gotwebd"
147 dbcc187b 2022-08-30 stsp location "/" {
148 0825911f 2022-01-01 stsp fastcgi socket "/run/gotweb.sock"
152 dbcc187b 2022-08-30 stsp # hosting multiple gotwebd instances on the same HTTP server:
153 dbcc187b 2022-08-30 stsp # http://gotweb2.example.com/gotwebd-unix/
154 dbcc187b 2022-08-30 stsp # http://gotweb2.example.com/gotwebd-tcp/
155 dbcc187b 2022-08-30 stsp server "gotweb2.example.com" {
156 dbcc187b 2022-08-30 stsp listen on * port 80
157 dbcc187b 2022-08-30 stsp location "/gotwebd-unix/" {
158 59975c69 2022-08-29 stsp fastcgi socket "/run/gotweb.sock"
160 dbcc187b 2022-08-30 stsp location "/gotwebd-unix/*" {
161 dbcc187b 2022-08-30 stsp root "/htdocs/gotwebd"
162 dbcc187b 2022-08-30 stsp request strip 1
164 dbcc187b 2022-08-30 stsp location "/gotwebd-tcp/" {
165 59975c69 2022-08-29 stsp fastcgi socket tcp 127.0.0.1 9000
167 dbcc187b 2022-08-30 stsp location "/gotwebd-tcp/*" {
168 dbcc187b 2022-08-30 stsp root "/htdocs/gotwebd"
169 dbcc187b 2022-08-30 stsp request strip 1
173 a596b957 2022-07-14 tracey .Sh SEE ALSO
174 a596b957 2022-07-14 tracey .Xr got 1 ,
175 a596b957 2022-07-14 tracey .Xr git-repository 5 ,
176 59975c69 2022-08-29 stsp .Xr gotwebd.conf 5 ,
177 41d6d08a 2022-09-07 stsp .Xr http.conf 5 ,
178 59975c69 2022-08-29 stsp .Xr httpd 8
179 a596b957 2022-07-14 tracey .Sh AUTHORS
180 59975c69 2022-08-29 stsp .An Omar Polo Aq Mt op@openbsd.org
181 a596b957 2022-07-14 tracey .An Stefan Sperling Aq Mt stsp@openbsd.org
182 59975c69 2022-08-29 stsp .An Tracey Emery Aq Mt tracey@traceyemery.net