Blame


1 8a35f56c 2022-07-16 thomas .\"
2 8a35f56c 2022-07-16 thomas .\" Copyright (c) 2020 Stefan Sperling
3 8a35f56c 2022-07-16 thomas .\"
4 8a35f56c 2022-07-16 thomas .\" Permission to use, copy, modify, and distribute this software for any
5 8a35f56c 2022-07-16 thomas .\" purpose with or without fee is hereby granted, provided that the above
6 8a35f56c 2022-07-16 thomas .\" copyright notice and this permission notice appear in all copies.
7 8a35f56c 2022-07-16 thomas .\"
8 8a35f56c 2022-07-16 thomas .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 8a35f56c 2022-07-16 thomas .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 8a35f56c 2022-07-16 thomas .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 8a35f56c 2022-07-16 thomas .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 8a35f56c 2022-07-16 thomas .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 8a35f56c 2022-07-16 thomas .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 8a35f56c 2022-07-16 thomas .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 8a35f56c 2022-07-16 thomas .\"
16 8a35f56c 2022-07-16 thomas .Dd $Mdocdate$
17 8a35f56c 2022-07-16 thomas .Dt GOTWEB 8
18 8a35f56c 2022-07-16 thomas .Os
19 8a35f56c 2022-07-16 thomas .Sh NAME
20 8a35f56c 2022-07-16 thomas .Nm gotweb
21 8a35f56c 2022-07-16 thomas .Nd Game of Trees Git repository server for web browsers -- which obviously
22 8a35f56c 2022-07-16 thomas needs to be updated to gotwebd
23 8a35f56c 2022-07-16 thomas .Sh SYNOPSIS
24 8a35f56c 2022-07-16 thomas .Nm
25 8a35f56c 2022-07-16 thomas .Sh DESCRIPTION
26 8a35f56c 2022-07-16 thomas .Nm
27 8a35f56c 2022-07-16 thomas provides a web interface allowing Git repository contents to be viewed
28 8a35f56c 2022-07-16 thomas with a web browser.
29 8a35f56c 2022-07-16 thomas .Pp
30 8a35f56c 2022-07-16 thomas .Nm
31 8a35f56c 2022-07-16 thomas is a CGI program based on
32 8a35f56c 2022-07-16 thomas .Xr got 1
33 8a35f56c 2022-07-16 thomas and
34 8a35f56c 2022-07-16 thomas .Xr kcgi 3
35 8a35f56c 2022-07-16 thomas which is intended to run in a
36 8a35f56c 2022-07-16 thomas .Xr chroot 2
37 8a35f56c 2022-07-16 thomas environment in
38 8a35f56c 2022-07-16 thomas .Pa /var/www .
39 8a35f56c 2022-07-16 thomas The program has been designed to work out of the box with
40 8a35f56c 2022-07-16 thomas the
41 8a35f56c 2022-07-16 thomas .Xr httpd 8
42 8a35f56c 2022-07-16 thomas web server in conjunction with
43 8a35f56c 2022-07-16 thomas .Xr slowcgi 8 .
44 8a35f56c 2022-07-16 thomas .Pp
45 8a35f56c 2022-07-16 thomas Enabling
46 8a35f56c 2022-07-16 thomas .Nm
47 8a35f56c 2022-07-16 thomas requires the following steps:
48 8a35f56c 2022-07-16 thomas .Bl -enum
49 8a35f56c 2022-07-16 thomas .It
50 8a35f56c 2022-07-16 thomas The
51 8a35f56c 2022-07-16 thomas .Xr httpd.conf 5
52 8a35f56c 2022-07-16 thomas configuration file must be adjusted to run
53 8a35f56c 2022-07-16 thomas .Nm
54 8a35f56c 2022-07-16 thomas as a CGI program with
55 8a35f56c 2022-07-16 thomas .Xr slowcgi 8 .
56 8a35f56c 2022-07-16 thomas The
57 8a35f56c 2022-07-16 thomas .Sx EXAMPLES
58 8a35f56c 2022-07-16 thomas section below contains an appropriate configuration file sample.
59 8a35f56c 2022-07-16 thomas .It
60 8a35f56c 2022-07-16 thomas httpd(8) and slowcgi(8) must be enabled and started:
61 8a35f56c 2022-07-16 thomas .Bd -literal -offset indent
62 8a35f56c 2022-07-16 thomas # rcctl enable httpd slowcgi
63 8a35f56c 2022-07-16 thomas # rcctl start httpd slowcgi
64 8a35f56c 2022-07-16 thomas .Ed
65 8a35f56c 2022-07-16 thomas .It
66 8a35f56c 2022-07-16 thomas Optionally, the run-time behaviour of
67 8a35f56c 2022-07-16 thomas .Nm
68 8a35f56c 2022-07-16 thomas can be configured via the
69 8a35f56c 2022-07-16 thomas .Xr gotweb.conf 5
70 8a35f56c 2022-07-16 thomas configuration file.
71 8a35f56c 2022-07-16 thomas .It
72 8a35f56c 2022-07-16 thomas Git repositories must be created at a suitable location inside the
73 8a35f56c 2022-07-16 thomas web server's
74 8a35f56c 2022-07-16 thomas .Xr chroot 2
75 8a35f56c 2022-07-16 thomas environment.
76 8a35f56c 2022-07-16 thomas These repositories should
77 8a35f56c 2022-07-16 thomas .Em not
78 8a35f56c 2022-07-16 thomas be writable by the user ID of the
79 8a35f56c 2022-07-16 thomas .Xr httpd 8
80 8a35f56c 2022-07-16 thomas server.
81 8a35f56c 2022-07-16 thomas The default location for repositories published by
82 8a35f56c 2022-07-16 thomas .Nm
83 8a35f56c 2022-07-16 thomas is
84 8a35f56c 2022-07-16 thomas .Pa /var/www/got/public .
85 8a35f56c 2022-07-16 thomas .It
86 8a35f56c 2022-07-16 thomas Git repositories served by
87 8a35f56c 2022-07-16 thomas .Nm
88 8a35f56c 2022-07-16 thomas should be kept up-to-date with a mechanism such as
89 8a35f56c 2022-07-16 thomas .Cm got fetch ,
90 8a35f56c 2022-07-16 thomas .Xr git-fetch 1 ,
91 8a35f56c 2022-07-16 thomas or
92 8a35f56c 2022-07-16 thomas .Xr rsync 1 ,
93 8a35f56c 2022-07-16 thomas scheduled by
94 8a35f56c 2022-07-16 thomas .Xr cron 8 .
95 8a35f56c 2022-07-16 thomas .El
96 8a35f56c 2022-07-16 thomas .Sh FILES
97 8a35f56c 2022-07-16 thomas .Bl -tag -width /var/www/got/public/ -compact
98 8a35f56c 2022-07-16 thomas .It Pa /var/www/got/public/
99 8a35f56c 2022-07-16 thomas Default location for Git repositories served by
100 8a35f56c 2022-07-16 thomas .Nm .
101 8a35f56c 2022-07-16 thomas This location can be adjusted in the
102 8a35f56c 2022-07-16 thomas .Xr gotweb.conf 5
103 8a35f56c 2022-07-16 thomas configuration file.
104 8a35f56c 2022-07-16 thomas .It Pa /var/www/cgi-bin/gotweb/gotweb
105 8a35f56c 2022-07-16 thomas The
106 8a35f56c 2022-07-16 thomas .Nm
107 8a35f56c 2022-07-16 thomas CGI program, statically linked for use in a
108 8a35f56c 2022-07-16 thomas .Xr chroot 2
109 8a35f56c 2022-07-16 thomas environment.
110 8a35f56c 2022-07-16 thomas .It Pa /var/www/cgi-bin/gotweb/gw_tmpl/
111 8a35f56c 2022-07-16 thomas Directory for template files used by
112 8a35f56c 2022-07-16 thomas .Nm .
113 8a35f56c 2022-07-16 thomas .It Pa /var/www/cgi-bin/gotweb/libexec/
114 8a35f56c 2022-07-16 thomas Directory containing statically linked
115 8a35f56c 2022-07-16 thomas .Xr got 1
116 8a35f56c 2022-07-16 thomas helper programs which are run by
117 8a35f56c 2022-07-16 thomas .Nm
118 8a35f56c 2022-07-16 thomas to read Git repositories.
119 8a35f56c 2022-07-16 thomas .It Pa /var/www/htdocs/gotweb/
120 8a35f56c 2022-07-16 thomas Directory containing HTML, CSS, and image files used by
121 8a35f56c 2022-07-16 thomas .Nm .
122 8a35f56c 2022-07-16 thomas .It Pa /var/www/got/tmp/
123 8a35f56c 2022-07-16 thomas Directory for temporary files created by
124 8a35f56c 2022-07-16 thomas .Nm .
125 8a35f56c 2022-07-16 thomas .El
126 8a35f56c 2022-07-16 thomas .Sh EXAMPLES
127 8a35f56c 2022-07-16 thomas Example configuration for httpd.conf:
128 8a35f56c 2022-07-16 thomas .Bd -literal -offset indent
129 8a35f56c 2022-07-16 thomas
130 8a35f56c 2022-07-16 thomas types { include "/usr/share/misc/mime.types" }
131 8a35f56c 2022-07-16 thomas server "gotweb.example.com" {
132 8a35f56c 2022-07-16 thomas listen on * port 80
133 8a35f56c 2022-07-16 thomas root "/htdocs/gotweb"
134 8a35f56c 2022-07-16 thomas location "/cgi-bin/*" {
135 8a35f56c 2022-07-16 thomas root "/"
136 8a35f56c 2022-07-16 thomas fastcgi
137 8a35f56c 2022-07-16 thomas }
138 8a35f56c 2022-07-16 thomas location "/*" {
139 8a35f56c 2022-07-16 thomas directory index "index.html"
140 8a35f56c 2022-07-16 thomas }
141 8a35f56c 2022-07-16 thomas }
142 8a35f56c 2022-07-16 thomas .Ed
143 8a35f56c 2022-07-16 thomas .Sh SEE ALSO
144 8a35f56c 2022-07-16 thomas .Xr got 1 ,
145 8a35f56c 2022-07-16 thomas .Xr kcgi 3 ,
146 8a35f56c 2022-07-16 thomas .Xr git-repository 5 ,
147 8a35f56c 2022-07-16 thomas .Xr gotweb.conf 5 ,
148 8a35f56c 2022-07-16 thomas .Xr httpd 8 ,
149 8a35f56c 2022-07-16 thomas .Xr slowcgi 8
150 8a35f56c 2022-07-16 thomas .Sh AUTHORS
151 8a35f56c 2022-07-16 thomas .An Tracey Emery Aq Mt tracey@traceyemery.net
152 8a35f56c 2022-07-16 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org