2 .\" Copyright (c) 2020 Tracey Emery <tracey@traceyemery.net>
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.
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.
21 .Nd gotwebd configuration file
24 is the run-time configuration file for
27 The file format is line-based, with one configuration directive per line.
28 Comments can be put anywhere in the file using a hash mark
30 and extend to the end of the current line.
31 Arguments names not beginning with a letter, digit or underscore,
32 as well as reserved words
33 .Pq such as Ic listen , Ic server No or Ic user ,
35 Arguments containing whitespace should be surrounded by double quotes
38 Macros can be defined that are later expanded in context.
39 Macro names must start with a letter, digit, or underscore, and may
40 contain any of those characters, but may not be reserved words.
41 Macros are not expanded inside quotes.
43 .Bd -literal -offset indent
44 lan_addr = "192.168.0.1"
45 listen on $lan_addr port 9090
56 .Sh GLOBAL CONFIGURATION
57 The available global configuration directives are as follows:
64 If not specified, it defaults to
66 the home directory of the www user.
67 .It Ic listen on Ar address Ic port Ar number
68 Configure an address and port for incoming FastCGI connections.
71 arguments are hostnames, IPv4 and IPv6 addresses.
74 argument may be number or a service name defined in
76 May be specified multiple times to build up a list of listening sockets.
77 .It Ic listen on socket Ar path
80 socket for incoming FastCGI connections.
81 May be specified multiple times to build up a list of listening sockets.
82 .It Ic prefork Ar number
83 Run the specified number of server processes.
85 runs 3 server processes by default.
91 If not specified, the user www will be used.
101 .Pa /var/www/run/gotweb.sock .
102 .Sh SERVER CONFIGURATION
103 At least one server context must exist for
106 In case no server context is defined in the configuration file, a default
107 server context will be used which uses default parameters for all
110 A server context is declared with a unique
112 followed by server-specific configuration directives inside curly braces:
114 .Ic server Ar name Brq ...
116 The first server defined is used if the requested hostname is not
117 matched by any server block.
119 The available server configuration directives are as follows:
121 .It Ic custom_css Ar path
122 Set the path to a custom Cascading Style Sheet (CSS) to be used.
123 If this option is not specified then the default style sheet
127 Set the path to an image file containing a logo to be displayed.
130 .It Ic logo_url Ar url
131 Set a hyperlink for the logo.
133 .Lk https://gameoftrees.org .
134 .It Ic max_commits_display Ar number
135 Set the maximum amount of commits and tags displayed per page.
137 .It Ic max_repos_display Ar number
138 Set the maximum amount of repositories displayed on the index screen.
140 Set to zero to show all the repositories without pagination.
141 .It Ic repos_path Ar path
142 Set the path to the directory which contains Git repositories that
143 the server should publish.
147 .It Ic respect_exportok Ar on | off
148 Set whether to display the repository only if it contains the magic
149 .Pa git-daemon-export-ok
152 .It Ic show_repo_age Ar on | off
153 Toggle display of last repository modification date.
155 .It Ic show_repo_cloneurl Ar on | off
156 Toggle display of clone URLs for a repository.
157 This requires the creation of a
159 file inside the repository which contains one URL per line.
161 .It Ic show_repo_description Ar on | off
162 Toggle display of the repository description.
166 file in the repository should be updated with an appropriate description.
167 .It Ic show_repo_owner Ar on | off
168 Set whether to display the repository owner.
170 This requires the creation of an
172 file in the repository or adding an
174 field under the [gotweb] or [gitweb] section in the
176 file inside the repository.
178 .Bd -literal -offset indent
185 file has priority over the
188 .It Ic site_link Ar string
189 Set the displayed site link name for the index page.
192 .It Ic site_name Ar string
193 Set the displayed site name title.
196 .It Ic site_owner Ar string
197 Set the displayed site owner.
200 .It Ic show_site_owner Ar on | off
201 Toggle display of the site owner.
203 .It Ic summary_commits_display Ar number
204 The maximum number of commits to show in the summary page.
206 .It Ic summary_tags_display Ar number
207 The maximum number of tags to show in the summary page.
211 .Bl -tag -width Ds -compact
212 .It Pa /etc/gotwebd.conf
213 Default location of the
216 .It Pa /var/www/run/gotweb.sock
217 Default location for the
222 A sample configuration:
223 .Bd -literal -offset indent
225 site_name "my public repos"
226 site_owner "Flan Hacker"
227 site_link "Flan' Projects"
231 Another example, this time listening on a local port instead of the
235 .Bd -literal -offset indent
236 listen on 127.0.0.1 port 9000
237 listen on ::1 port 9000
240 site_name "my public repos"