Blame


1 a596b957 2022-07-14 tracey .\"
2 a596b957 2022-07-14 tracey .\" Copyright (c) 2020 Stefan Sperling
3 a596b957 2022-07-14 tracey .\"
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.
7 a596b957 2022-07-14 tracey .\"
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.
15 a596b957 2022-07-14 tracey .\"
16 a596b957 2022-07-14 tracey .Dd $Mdocdate$
17 59975c69 2022-08-29 stsp .Dt GOTWEBD 8
18 a596b957 2022-07-14 tracey .Os
19 a596b957 2022-07-14 tracey .Sh NAME
20 59975c69 2022-08-29 stsp .Nm gotwebd
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
23 a596b957 2022-07-14 tracey .Nm
24 7de33ce2 2022-09-07 stsp .Op Fl dnv
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
28 a596b957 2022-07-14 tracey .Nm
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
32 a596b957 2022-07-14 tracey the
33 a596b957 2022-07-14 tracey .Xr httpd 8
34 59975c69 2022-08-29 stsp web server.
35 a596b957 2022-07-14 tracey .Pp
36 7de33ce2 2022-09-07 stsp .Nm
37 7de33ce2 2022-09-07 stsp provides the following options:
38 7de33ce2 2022-09-07 stsp .Bl -tag -width tenletters
39 7de33ce2 2022-09-07 stsp .It Fl d
40 7de33ce2 2022-09-07 stsp Do not daemonize and log to stderr.
41 47b307cd 2022-10-02 op .It Fl D Ar macro Ns = Ns Ar value
42 47b307cd 2022-10-02 op Define
43 47b307cd 2022-10-02 op .Ar macro
44 47b307cd 2022-10-02 op to be set to
45 47b307cd 2022-10-02 op .Ar value .
46 47b307cd 2022-10-02 op Overrides the definition of
47 47b307cd 2022-10-02 op .Ar macro
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.
54 7de33ce2 2022-09-07 stsp .It Fl n
55 7de33ce2 2022-09-07 stsp Parse the configuration file, report errors if any, and exit.
56 7de33ce2 2022-09-07 stsp .It Fl v
57 7de33ce2 2022-09-07 stsp Verbose mode.
58 7de33ce2 2022-09-07 stsp Verbosity increases if this option is used multiple times.
59 7de33ce2 2022-09-07 stsp .El
60 7de33ce2 2022-09-07 stsp .Pp
61 a596b957 2022-07-14 tracey Enabling
62 a596b957 2022-07-14 tracey .Nm
63 a596b957 2022-07-14 tracey requires the following steps:
64 a596b957 2022-07-14 tracey .Bl -enum
65 a596b957 2022-07-14 tracey .It
66 a596b957 2022-07-14 tracey The
67 a596b957 2022-07-14 tracey .Xr httpd.conf 5
68 a596b957 2022-07-14 tracey configuration file must be adjusted to run
69 a596b957 2022-07-14 tracey .Nm
70 789899c8 2022-10-24 stsp as a FastCGI helper program.
71 a596b957 2022-07-14 tracey The
72 a596b957 2022-07-14 tracey .Sx EXAMPLES
73 a596b957 2022-07-14 tracey section below contains an appropriate configuration file sample.
74 a596b957 2022-07-14 tracey .It
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
79 a596b957 2022-07-14 tracey .Ed
80 a596b957 2022-07-14 tracey .It
81 a596b957 2022-07-14 tracey Optionally, the run-time behaviour of
82 a596b957 2022-07-14 tracey .Nm
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.
86 a596b957 2022-07-14 tracey .It
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
92 a596b957 2022-07-14 tracey .Em not
93 e4556f5a 2022-08-30 stsp be writable by the user ID shared between
94 e4556f5a 2022-08-30 stsp .Nm
95 e4556f5a 2022-08-30 stsp and
96 e4556f5a 2022-08-30 stsp .Xr httpd 8 .
97 a596b957 2022-07-14 tracey The default location for repositories published by
98 a596b957 2022-07-14 tracey .Nm
99 a596b957 2022-07-14 tracey is
100 a596b957 2022-07-14 tracey .Pa /var/www/got/public .
101 a596b957 2022-07-14 tracey .It
102 a596b957 2022-07-14 tracey Git repositories served by
103 a596b957 2022-07-14 tracey .Nm
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 ,
107 a596b957 2022-07-14 tracey or
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 .
111 a596b957 2022-07-14 tracey .El
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
120 a596b957 2022-07-14 tracey .Nm .
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
128 a596b957 2022-07-14 tracey .Nm
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
132 a596b957 2022-07-14 tracey .Nm .
133 59975c69 2022-08-29 stsp .It Pa /tmp/
134 a596b957 2022-07-14 tracey Directory for temporary files created by
135 a596b957 2022-07-14 tracey .Nm .
136 a596b957 2022-07-14 tracey .El
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" }
142 dbcc187b 2022-08-30 stsp
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 dbcc187b 2022-08-30 stsp fastcgi socket tcp localhost 9000
149 dbcc187b 2022-08-30 stsp }
150 dbcc187b 2022-08-30 stsp }
151 dbcc187b 2022-08-30 stsp
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"
159 59975c69 2022-08-29 stsp }
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
163 dbcc187b 2022-08-30 stsp }
164 dbcc187b 2022-08-30 stsp location "/gotwebd-tcp/" {
165 59975c69 2022-08-29 stsp fastcgi socket tcp 127.0.0.1 9000
166 59975c69 2022-08-29 stsp }
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
170 59975c69 2022-08-29 stsp }
171 a596b957 2022-07-14 tracey }
172 a596b957 2022-07-14 tracey .Ed
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