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 Any lines beginning with a
30 are treated as comments and ignored.
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.
37 .Bd -literal -offset indent
38 lan_addr = "192.168.0.1"
50 .Sh GLOBAL CONFIGURATION
51 The available global configuration directives are as follows:
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.
68 .Sh SERVER CONFIGURATION
69 At least one server context must exist for
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.
77 A server context is declared with a unique
79 followed by server-specific configuration directives inside curly braces:
81 .Ic server Ar name Brq ...
83 The first server defined is used if the requested hostname is not
84 matched by any server block.
86 The available server configuration directives are as follows:
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.
95 arguments are hostnames, IP4 addresses and IPv6 addresses.
98 argument may be number or a service name defined in
101 May be specified multiple times to build up a list of listening sockets.
102 However, a given combination of address and port may only be used by
104 .It Ic listen on socket off
105 Disable use of unix socket.
106 .It Ic listen on socket Ar path
107 Set the path to the unix socket used by the server.
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
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 respect_exportok Ar on | off
124 Set whether to display the repository only if it contains the magic
125 .Pa git-daemon-export-ok
127 .It Ic show_repo_age Ar on | off
128 Toggle display of last repository modification date.
129 .It Ic show_repo_cloneurl Ar on | off
130 Toggle display of clone URLs for a repository.
131 This requires the creation of a
133 file inside the repository which contains one URL per line.
134 .It Ic show_repo_description Ar on | off
135 Toggle display of the repository description.
138 file in the repository should be updated with an appropriate description.
139 .It Ic show_repo_owner Ar on | off
140 Set whether to display the repository owner.
141 Displaying the owner requires owner information to be added to the
143 file in the repository.
145 will parse owner information from either a [gotweb] or a [gitweb] section.
147 .Bd -literal -offset indent
151 .It Ic site_link Ar string
152 Set the displayed site link name for the index page.
153 .It Ic site_name Ar string
154 Set the displayed site name title.
155 .It Ic site_owner Ar string
156 Set the displayed site owner.
157 .It Ic show_site_owner Ar on | off
158 Toggle display of the site owner.
161 .Bl -tag -width Ds -compact
162 .It Pa /etc/gotwebd.conf
163 Default location of the
168 These are the currently configurable items for
170 with their default values.
171 .Bd -literal -offset indent
174 # all paths relative to /var/www (httpd chroot jail)
179 server "localhost-unix" {
180 repos_path "/got/public"
181 listen on socket "/run/gotweb.sock"
183 site_name "my public repos"
184 site_owner "Got Owner"
188 logo_url "https://gameoftrees.org"
194 #show_repo_description on
195 #show_repo_cloneurl on
196 #respect_exportok off
199 #max_repos_display 25
200 #max_commits_display 25
203 # Example server context for FCGI over TCP connections:
204 #server "localhost-tcp" {
205 # repos_path "/got/public"
206 # listen on socket off
207 # listen on 127.0.0.1 port 9000
208 # listen on ::1 port 9000