Blob


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