Blob


1 .\"
2 .\" Copyright (c) 2020 Tracey Emery <tracey@traceyemery.net>
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate$
17 .Dt GOTWEBD.CONF 5
18 .Os
19 .Sh NAME
20 .Nm gotwebd.conf
21 .Nd gotwebd configuration file
22 .Sh DESCRIPTION
23 .Nm
24 is the run-time configuration file for
25 .Xr gotwebd 8 .
26 .Pp
27 The file format is line-based, with one configuration directive per line.
28 Any lines beginning with a
29 .Sq #
30 are treated as comments and ignored.
31 .Pp
32 Paths mentioned in
33 .Nm
34 must be relative to
35 .Pa /var/www ,
36 the
37 .Xr chroot 2
38 environment of
39 .Xr httpd 8 .
40 .Sh GLOBAL CONFIGURATION
41 The available global configuration directives are as follows:
42 .Bl -tag -width Ds
43 .It Ic chroot Ar path
44 Set the path to the
45 .Xr chroot 2
46 environment of
47 .Xr httpd 8 .
48 If not specified then
49 .Pa /var/www
50 will be used.
51 .It Ic prefork Ar number
52 Run the specified number of server processes.
53 .It Ic unix_socket Ar on | off
54 Controls whether the servers will listen on unix sockets by default.
55 .It Ic unix_socket_name Ar path
56 Set the path to the default unix socket.
57 .El
58 .Sh SERVER CONFIGURATION
59 At least one server context must exist for
60 .Xr gotwebd 8
61 to function.
62 In case no server context is defined in the configuration file, a default
63 server context will be used, which listens on a unix socket at
64 .Pa /var/www/run/gotweb.sock
65 and uses default parameters for all applicable settings.
66 .Pp
67 A server context is declared with a unique
68 .Ar name ,
69 followed by server-specific configuration directives inside curly braces:
70 .Pp
71 .Ic server Ar name Brq ...
72 .Pp
73 .Xr gotwebd 8
74 is compatible with TLS Server Name Indication (SNI), provided the
75 .Ar name
76 of a server defined in
77 .Nm
78 corresponds to the name of a server defined in
79 .Xr httpd.conf 5 .
80 .Pp
81 The available server configuration directives are as follows:
82 .Bl -tag -width Ds
83 .It Ic custom_css Ar path
84 Set the path to a custom Cascading Style Sheet (CSS) to be used.
85 If this option is not specified then a default style sheet will be used.
86 .It Ic listen on Ar address Ic port Ar number
87 Configure an address and port for incoming FCGI TCP connections.
88 Valid
89 .Ar address
90 arguments are hostnames, IP4 addresses, IPv6 addresses, and network
91 interface names.
92 The
93 .Ar port
94 argument may be number or a service name defined in
95 .Xr services 5 .
96 .Pp
97 May be specified multiple times to build up a list of listening sockets.
98 However, a given combination of address and port may only be used by
99 one server.
100 .Pp
101 If a network interface name is given as
102 .Ar address
103 argument then
104 .Xr gotwebd 8
105 will obtain the list of addresses on this interface only on startup.
106 Any future changes to the address configuration of the interface will
107 be ignored.
108 .It Ic logo Ar path
109 Set the path to an image file containing a logo to be displayed.
110 .It Ic logo_url Ar url
111 Set a hyperlink for the logo.
112 .It Ic max_commits_display Ar number
113 Set the maximum amount of commits displayed per page.
114 .It Ic max_repos Ar number
115 Set the maximum amount of repositories
116 .Xr gotwebd 8
117 will work with.
118 .It Ic max_repos_display Ar number
119 Set the maximum amount of repositories displayed on the index screen.
120 .It Ic repos_path Ar path
121 Set the path to the directory which contains Git repositories that
122 the server should publish.
123 .It Ic show_repo_age Ar on | off
124 Toggle display of last repository modification date.
125 .It Ic show_repo_cloneurl Ar on | off
126 Toggle display of clone URLs for a repository.
127 This requires the creation of a
128 .Pa cloneurl
129 file inside the repository which contains one URL per line.
130 .It Ic show_repo_description Ar on | off
131 Toggle display of the repository description.
132 The
133 .Pa description
134 file in the repository should be updated with an appropriate description.
135 .It Ic show_repo_owner Ar on | off
136 Set whether to display the repository owner.
137 Displaying the owner requires owner information to be added to the
138 .Pa config
139 file in the repository.
140 .Xr gotwebd 8
141 will parse owner information from either a [gotweb] or a [gitweb] section.
142 For example:
143 .Bd -literal -offset indent
144 [gotweb]
145 owner = "Your Name"
146 .Ed
147 .It Ic site_link Ar string
148 Set the displayed site link name for the index page.
149 .It Ic site_name Ar string
150 Set the displayed site name title.
151 .It Ic site_owner Ar string
152 Set the displayed site owner.
153 .It Ic show_site_owner Ar on | off
154 Toggle display of the site owner.
155 .It Ic unix_socket Ar on | off
156 Enable or disable use of unix sockets.
157 .It Ic unix_socket_name Ar path
158 Set the path to the unix socket used by the server.
159 .El
160 .Sh EXAMPLES
161 These are the currently configurable items for
162 .Xr gotwebd 8
163 with their default values.
164 .Bd -literal -offset indent
166 # gotwebd options
167 # all paths relative to /var/www (httpd chroot jail)
170 prefork 1
172 server "localhost-unix" {
173 repos_path "/got/public"
174 unix_socket_name "/run/gotweb.sock"
176 got_site_name "my public repos"
177 got_site_owner "Got Owner"
178 got_site_link "repos"
180 logo "got.png"
181 logo_url "https://gameoftrees.org"
183 # on by default
184 #show_site_owner off
185 #show_repo_owner off
186 #show_repo_age false
187 #show_repo_description no
188 #show_repo_cloneurl off
190 #max_repos 100
191 #max_repos_display 25
192 #max_commits_display 50
195 # Example server context for FCGI over TCP connections:
196 #server "localhost-tcp" {
197 # repos_path "/got/public"
198 # unix_socket off
199 # listen on 127.0.0.1 port 9000
200 # listen on ::1 port 9000
201 #}
202 .Ed
203 .Sh FILES
204 .Bl -tag -width Ds -compact
205 .It Pa /etc/gotwebd.conf
206 Default location of the
207 .Nm
208 configuration file.
209 .El
210 .Sh SEE ALSO
211 .Xr got 1 ,
212 .Xr httpd.conf 5 ,
213 .Xr services 5 ,
214 .Xr gotwebd 8 ,
215 .Xr httpd 8