-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvicarian-dns01.corn
More file actions
61 lines (55 loc) · 1.85 KB
/
vicarian-dns01.corn
File metadata and controls
61 lines (55 loc) · 1.85 KB
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
let {
$env_PORKBUN_KEY = "fallback value"
$env_PORKBUN_SECRET = "fallback value"
} in {
listen = {
addrs = [
"[::]" // Default; this covers IPv4 & IPv6
]
insecure_port = 80 // Default; will redirect to TLS
tls_port = 443 // Default
}
vhosts = [
{
hostname = "files.example.com"
// Optional aliases for this host. These will be added to
// the generated TLS certificate.
aliases = [
"docs.example.com"
"pics.example.com"
]
tls = {
acme = {
acme_provider = "letsencrypt" // Default & only supported provider ATM
contact = "admin@example.com"
challenge = {
type = "dns-01"
dns_provider = {
name = "porkbun"
key = $env_PORKBUN_KEY
secret = $env_PORKBUN_SECRET
}
}
}
}
backends = [
{
// A service that does not allow a custom root/context,
// so we must place at root.
context = "/"
url = "http://localhost:8443"
// This service enforces TLS with a self-signed cert, so
// we need to disable certificate verification.
//
// Looking at you Unifi Controller.
trust = true
}
{
// A better behaved service that allows a custom root.
context = "/copyparty"
url = "http://localhost:9090"
}
]
}
]
}