-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile
113 lines (84 loc) · 1.98 KB
/
Caddyfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
(common) {
header /* {
-server
-X-Powered-By
-via
}
@static {
file
path *.ico *.css *.js *.gif *.webp *.avif *.jpg *.jpeg *.png *.svg *.woff *.woff2
}
header @static cache-control "max-age=0; must-revalidate; public;"
handle_errors {
@custom_err file /errors/{err.status_code}.html /errors/error.html
handle @custom_err {
rewrite * {file_match.relative}
file_server
}
respond "{err.status_code} {err.status_text}"
}
}
www.derpytools.site {
redir https://derpytools.site permanent
}
derpytools.site {
tls certs/caddy/cert.pem certs/caddy/key.pem
# tls /etc/caddy/certs/cert.pem /etc/caddy/certs/key.pem
encode zstd gzip
# Directly reverse proxy to Phoenix
reverse_proxy localhost:4000
# Proxy to Varnish Cache (Only use with production builds)
# reverse_proxy localhost:3080
import common
}
img.derpytools.site {
# Directly reverse proxy to imgproxy
reverse_proxy localhost:9080
# Reverse proxy to Varnish cache instead (Only use with production builds)
# reverse_proxy localhost:3080 {
# # header_down Cache-Control "max-age=0; must-revalidate; public;"
# # header_down Cache-Control "public; max-age=31536000; immutable;"
# }
import common
}
docs.derpytools.site {
encode zstd gzip
root * doc
file_server browse
}
netdata.derpytools.site {
encode zstd gzip
reverse_proxy localhost:19999
basicauth * {
DerpyCoder $2b$05$4N/0p0i/fsNkiYHhNs9yruEMPbiOsQqxEfMkmrkan9w5hKNxSFRdK
}
import common
}
canary.derpytools.site {
encode zstd gzip
reverse_proxy localhost:4001
basicauth * {
DerpyCoder $2b$05$4N/0p0i/fsNkiYHhNs9yruEMPbiOsQqxEfMkmrkan9w5hKNxSFRdK
}
import common
}
metrics.derpytools.site {
metrics
import common
}
livebook.derpytools.site {
encode zstd gzip
reverse_proxy localhost:49223
}
search.derpytools.site {
encode zstd gzip
reverse_proxy localhost:7700
}
grafana.derpytools.site {
encode zstd gzip
reverse_proxy localhost:3000
}
prometheus.derpytools.site {
encode zstd gzip
reverse_proxy localhost:9090
}