跳至正文
Wener Notes

Caddy FAQ

约 1 分钟阅读
标签:FAQ

禁用自动证书

text
{
	auto_https off
}

ACME DNS Wildcard cert

text
{
	http_port 80
	https_port 443

	log {
		output stdout
		level INFO
		format console
	}

	acme_dns acmedns {
		config {
      # *.examole.com 会让匹配到的域名都使用这里的 配置
			"example.com" {
				username ""
				password ""
				subdomain ""
				fulldomain ""
				server_url "https://auth.acme-dns.io"
			}
		}
	}
}

http://:80 {
	respond / "Hello World" 200
}

*.example.com {
  @web host web.example.com
  handle @web {
    respond / "Hi from Web" 200
  }

	handle {
    respond / "Hi from Root" 200
  }
}
yaml
# caddy-docker-proxy
- caddy=*.example.com
- caddy.1_@foo = host foo.example.com
- caddy.1_handle = @foo
- 'caddy.1_handle.reverse_proxy={{ upstreams 8080 }}'

ZeroSSL ACME

text
{
    acme_ca https://acme.zerossl.com/v2/DV90
    email   [email protected]
}
text
{
    acme_ca https://acme.zerossl.com/v2/DV90
    acme_eab {
        key_id  $ACME_EAB_KEY_ID
        mac_key $ACME_EAB_MAC_KEY
    }
}
text
tls [email protected] {
    ca https://acme.zerossl.com/v2/DV90
}
text
tls {
   ca  https://acme.zerossl.com/v2/DV90
   eab <key_id> <mac_key>
}

could not determine the zone for: unexpected response code 'SERVFAIL'

DNS 有问题

loading initial config: loading new config: creating storage value: context deadline exceeded

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub2 条
其他外链2 条
最近更新commit e6a0237编辑