summaryrefslogtreecommitdiffstats
path: root/Caddyfile
blob: d592e6bd4ae16f764fc73cf7af948267e22fb0a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
git.rustymanta.xyz {
    @git {
        header User-Agent git/*
    }

    route {
        handle /cgit.* {
            root * /usr/share/webapps/cgit
            file_server
        }

        handle @git {
            cgi * /usr/libexec/git-core/git-http-backend {
                env GIT_PROJECT_ROOT=/git-repos GIT_HTTP_EXPORT_ALL=1 GIT_HTTP_RECEIVEPACK=0
            }
        }

        handle {
            cgi * /usr/share/webapps/cgit/cgit.cgi {
                env CGIT_CONFIG=/cgitrc
            }
        }
    }
}