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 Macros can be defined that are later expanded in context.
33 Macro names must start with a letter, digit, or underscore, and may
34 contain any of those characters, but may not be reserved words.
35 Macros are not expanded inside quotes.
36 For example:
37 .Bd -literal -offset indent
38 lan_addr = "192.168.0.1"
39 listen on $lan_addr
40 .Ed
41 .Pp
42 Paths mentioned in
43 .Nm
44 must be relative to
45 .Pa /var/www ,
46 the
47 .Xr chroot 2
48 environment of
49 .Xr httpd 8 .
50 .Sh GLOBAL CONFIGURATION
51 The available global configuration directives are as follows:
52 .Bl -tag -width Ds
53 .It Ic chroot Ar path
54 Set the path to the
55 .Xr chroot 2
56 environment of
57 .Xr httpd 8 .
58 If not specified then
59 .Pa /var/www
60 will be used.
61 .It Ic prefork Ar number
62 Run the specified number of server processes.
63 .It Ic unix_socket Ar on | off
64 Controls whether the servers will listen on unix sockets by default.
65 .It Ic unix_socket_name Ar path
66 Set the path to the default unix socket.
67 .El
68 .Sh SERVER CONFIGURATION
69 At least one server context must exist for
70 .Xr gotwebd 8
71 to function.
72 In case no server context is defined in the configuration file, a default
73 server context will be used, which listens on a unix socket at
74 .Pa /var/www/run/gotweb.sock
75 and uses default parameters for all applicable settings.
76 .Pp
77 A server context is declared with a unique
78 .Ar name ,
79 followed by server-specific configuration directives inside curly braces:
80 .Pp
81 .Ic server Ar name Brq ...
82 .Pp
83 The first server defined is used if the requested hostname is not
84 matched by any server block.
85 .Pp
86 The available server configuration directives are as follows:
87 .Bl -tag -width Ds
88 .It Ic custom_css Ar path
89 Set the path to a custom Cascading Style Sheet (CSS) to be used.
90 If this option is not specified then a default style sheet will be used.
91 .It Ic listen on Ar address Ic port Ar number
92 Configure an address and port for incoming FCGI TCP connections.
93 Valid
94 .Ar address
95 arguments are hostnames, IP4 addresses, IPv6 addresses, and network
96 interface names.
97 The
98 .Ar port
99 argument may be number or a service name defined in
100 .Xr services 5 .
101 .Pp
102 May be specified multiple times to build up a list of listening sockets.
103 However, a given combination of address and port may only be used by
104 one server.
105 .Pp
106 If a network interface name is given as
107 .Ar address
108 argument then
109 .Xr gotwebd 8
110 will obtain the list of addresses on this interface only on startup.
111 Any future changes to the address configuration of the interface will
112 be ignored.
113 .It Ic listen on socket off
114 Disable use of unix socket.
115 .It Ic listen on socket Ar path
116 Set the path to the unix socket used by the server.
117 .It Ic logo Ar path
118 Set the path to an image file containing a logo to be displayed.
119 .It Ic logo_url Ar url
120 Set a hyperlink for the logo.
121 .It Ic max_commits_display Ar number
122 Set the maximum amount of commits displayed per page.
123 .It Ic max_repos Ar number
124 Set the maximum amount of repositories
125 .Xr gotwebd 8
126 will work with.
127 .It Ic max_repos_display Ar number
128 Set the maximum amount of repositories displayed on the index screen.
129 .It Ic repos_path Ar path
130 Set the path to the directory which contains Git repositories that
131 the server should publish.
132 .It Ic respect_exportok Ar on | off
133 Set whether to display the repository only if it contains the magic
134 .Pa git-daemon-export-ok
135 file.
136 .It Ic show_repo_age Ar on | off
137 Toggle display of last repository modification date.
138 .It Ic show_repo_cloneurl Ar on | off
139 Toggle display of clone URLs for a repository.
140 This requires the creation of a
141 .Pa cloneurl
142 file inside the repository which contains one URL per line.
143 .It Ic show_repo_description Ar on | off
144 Toggle display of the repository description.
145 The
146 .Pa description
147 file in the repository should be updated with an appropriate description.
148 .It Ic show_repo_owner Ar on | off
149 Set whether to display the repository owner.
150 Displaying the owner requires owner information to be added to the
151 .Pa config
152 file in the repository.
153 .Xr gotwebd 8
154 will parse owner information from either a [gotweb] or a [gitweb] section.
155 For example:
156 .Bd -literal -offset indent
157 [gotweb]
158 owner = "Your Name"
159 .Ed
160 .It Ic site_link Ar string
161 Set the displayed site link name for the index page.
162 .It Ic site_name Ar string
163 Set the displayed site name title.
164 .It Ic site_owner Ar string
165 Set the displayed site owner.
166 .It Ic show_site_owner Ar on | off
167 Toggle display of the site owner.
168 .El
169 .Sh FILES
170 .Bl -tag -width Ds -compact
171 .It Pa /etc/gotwebd.conf
172 Default location of the
173 .Nm
174 configuration file.
175 .El
176 .Sh EXAMPLES
177 These are the currently configurable items for
178 .Xr gotwebd 8
179 with their default values.
180 .Bd -literal -offset indent
182 # gotwebd options
183 # all paths relative to /var/www (httpd chroot jail)
186 prefork 3
188 server "localhost-unix" {
189 repos_path "/got/public"
190 listen on socket "/run/gotweb.sock"
192 site_name "my public repos"
193 site_owner "Got Owner"
194 site_link "repos"
196 logo "got.png"
197 logo_url "https://gameoftrees.org"
199 # on by default
200 #show_site_owner on
201 #show_repo_owner on
202 #show_repo_age on
203 #show_repo_description on
204 #show_repo_cloneurl on
205 #respect_exportok off
207 #max_repos 0
208 #max_repos_display 25
209 #max_commits_display 25
212 # Example server context for FCGI over TCP connections:
213 #server "localhost-tcp" {
214 # repos_path "/got/public"
215 # listen on socket off
216 # listen on 127.0.0.1 port 9000
217 # listen on ::1 port 9000
218 #}
219 .Ed
220 .Sh SEE ALSO
221 .Xr got 1 ,
222 .Xr httpd.conf 5 ,
223 .Xr services 5 ,
224 .Xr gotwebd 8 ,
225 .Xr httpd 8