Closed tareny closed 7 months ago
I've been thinking about ways to make this easier, but for now, this pattern is in our docs: https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates
Edit: oh, I see you've seen that already. What is unclear about it?
I've been thinking about ways to make this easier, but for now, this pattern is in our docs: https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates
Edit: oh, I see you've seen that already. What is unclear about it?
I didn't understand this doc. Can you help me modify my caddyfile so that he can apply for wildcard certificates @mholt
What don't you understand? We think it's pretty clear.
This is my configuration file. I want to configure a 404 page for 01.example.com, but setting it up like this will prevent Caddy2 from running properly
*.example.com {
@01 host 00.example.com
......
@40 host 40.example.com
handle @00 {
handle_errors {
rewrite * /{err.status_code}.html
file_server
}
root * /srv/root
file_server
}
......
handle @40 {
reverse_proxy 127.0.0.1:10040
}
handle {
abort
}
}
You can't put handle_errors
inside a handle
, it must be top level. But you may put handle
inside handle_errors
. If you simply flip those two lines, it should work.
How should I set it up so that Caddy can apply for a generic domain certificate? I have a total of 41 website, and each update will trigger the Let's Encrypt restriction. However, all I need to do is apply for one wildcard domain (example, *. example) to fully cover 41 domains. I asked my friend and he recommended this to me, but I didn't understand it. https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates Could you please guide me on how to set up Wildcard certificates