GOTWEBD.CONF(5)

NAME
gotwebd.conf - gotwebd configuration file

DESCRIPTION
gotwebd.conf is the run-time configuration file for gotwebd(8).

The file format is line-based, with one configuration directive per line. Comments can be put anywhere in the file using a hash mark (‘#’), and extend to the end of the current line. Arguments names not beginning with a letter, digit or underscore, as well as reserved words (such as listen, server or user), must be quoted. Arguments containing whitespace should be surrounded by double quotes (").

Macros can be defined that are later expanded in context. Macro names must start with a letter, digit, or underscore, and may contain any of those characters, but may not be reserved words. Macros are not expanded inside quotes. For example:

    lan_addr = "192.168.0.1"
    listen on $lan_addr port 9090

GLOBAL CONFIGURATION
The available global configuration directives are as follows:

chroot path
    Set the path to the chroot(2) environment of httpd(8). If not specified, it defaults to /var/www, the home directory of the www user. Setting the path to / effectively disables chroot.

listen on address port number
    Configure an address and port for incoming FastCGI connections. Valid address arguments are hostnames, IPv4 and IPv6 addresses. The port argument may be number or a service name defined in services(5). May be specified multiple times to build up a list of listening sockets.

listen on socket path
    Configure a UNIX-domain socket for incoming FastCGI connections. May be specified multiple times to build up a list of listening sockets.

    While the specified path must be absolute, it should usually point inside the web server's chroot directory such that the web server can access the socket.

prefork number
    Run the specified number of server processes. gotwebd(8) runs 3 server processes by default.

user user
    Set the user which will run gotwebd(8). If not specified, the user _gotwebd will be used.

www user user
    Set the user which runs httpd(8). Needed to ensure that the web server can access UNIX-domain sockets created by gotwebd(8). If not specified, the user www will be used.

If no listen directive is used, gotwebd(8) will listen on the UNIX-domain socket at /var/www/run/gotweb.sock.

SERVER CONFIGURATION
At least one server context must exist for gotwebd(8) to function. In case no server context is defined in the configuration file, a default server context will be used which uses default parameters for all applicable settings.

A server context is declared with a unique name, followed by server-specific configuration directives inside curly braces:

server name {...}

The first server defined is used if the requested hostname is not matched by any server block.

The available server configuration directives are as follows:

custom_css path
    Set the path to a custom Cascading Style Sheet (CSS) to be used. If this option is not specified then the default style sheet ‘gotweb.css’ will be used.

    This path must be valid in the web server's URL space since browsers will attempt to fetch it.

logo path
    Set the path to an image file containing a logo to be displayed. Defaults to ‘got.png’.

    This path must be valid in the web server's URL space since browsers will attempt to fetch it.

logo_url url
    Set a hyperlink for the logo. Defaults to https://gameoftrees.org.

max_commits_display number
    Set the maximum amount of commits and tags displayed per page. Defaults to 25.

max_repos_display number
    Set the maximum amount of repositories displayed on the index screen. Defaults to 25. Set to zero to show all the repositories without pagination.

repos_path path
    Set the path to the directory which contains Git repositories that the server should publish. This path is absolute. Repositories can be served even if they reside outside the web server's chroot directory.

    Defaults to /got/public inside the web server's chroot directory. The chroot directive must be used before the server declaration in order to take effect.

respect_exportok on | off
    Set whether to display the repository only if it contains the magic git-daemon-export-ok file. Disabled by default.

show_repo_age on | off
    Toggle display of last repository modification date. Enabled by default.

show_repo_cloneurl on | off
    Toggle display of clone URLs for a repository. This requires the creation of a cloneurl file inside the repository which contains one URL per line. Enabled by default.

show_repo_description on | off
    Toggle display of the repository description. Enabled by default. The description file in the repository should be updated with an appropriate description.

show_repo_owner on | off
    Set whether to display the repository owner. Enabled by default. This requires the creation of an owner file in the repository or adding an ‘owner’ field under the [gotweb] or [gitweb] section in the config file inside the repository. For example:

        [gotweb]
        owner = "Your Name"

    The owner file has priority over the config if present.

site_link string
    Set the displayed site link name for the index page. Defaults to ‘Repos’.

site_name string
    Set the displayed site name title. Defaults to ‘Gotweb’.

site_owner string
    Set the displayed site owner. Defaults to ‘Got Owner’.

show_site_owner on | off
    Toggle display of the site owner. Enabled by default.

summary_commits_display number
    The maximum number of commits to show in the summary page. Defaults to 10.

summary_tags_display number
    The maximum number of tags to show in the summary page. Defaults to 3.

FILES
/etc/gotwebd.conf
    Default location of the gotwebd.conf configuration file.
/var/www/run/gotweb.sock
    Default location for the gotwebd(8) listening socket.

EXAMPLES
A sample configuration:

    www user "www"   # www username needs quotes since www is a keyword
    server "localhost" {
    	site_name	"my public repos"
    	site_owner	"Flan Hacker"
    	site_link	"Flan' Projects"
    }

Another example, this time listening on a local port instead of the implicit UNIX socket, and serving repositories located outside the web server's chroot:

    listen on 127.0.0.1 port 9000
    listen on ::1 port 9000
    server "localhost" {
    	site_name	"my public repos"
    	repos_path	"/var/git"
    }

SEE ALSO
got(1), httpd.conf(5), services(5), gotwebd(8), httpd(8)