about summary refs log tree commit diff
path: root/bundles/git/files/Caddyfile
blob: 99a011e6331a29b04d047c32bbb427b27d95becf (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# vim: noet ts=2 sw=2
{
	admin off
	auto_https off
	http_port {$CADDY_HTTP_PORT:1414}
}

http:// {
	encode zstd gzip

	handle /healthz {
		respond OK 200
	}

	handle /custom.css {
		root * /var/www/cgit/
		file_server
	}

	@static_paths {
		path /robots.txt
		path /cgit.css
		path /cgit.png
	}
	handle @static_paths {
		root * /usr/share/webapps/cgit/
		file_server
	}

	handle {
		reverse_proxy unix//run/fcgiwrap/fcgiwrap.sock {
			transport fastcgi {
				env DOCUMENT_ROOT /usr/share/webapps/cgit/
				env SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi
			}
		}
	}

	log {
		format filter {
			wrap console {
				time_format wall_milli
				level_format color
			}
			fields {
				common_log delete
				request>headers>Accept-Encoding delete
				request>headers>Accept-Language delete
				request>headers>Connection delete
				request>headers>Authorization delete
				request>remote_addr ip_mask {
					ipv4 24
					ipv6 32
				}
			}
		}
	}
}