Blame


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