Blame


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