Hello,
I would like to only a few specific vlan to access some subdomains.
How to avoid repeating those remote_ip addresses to make it easier to change ?
Is there a way to handle subdomains differently ?
Or some kind of variables ?
Thanks for your support,
Here is my current working config (with IPs+domains redacted):
I read a bit more docs and forums and ended up with this:
At least the allowed remote IPs are not repeated x times accross subdomains.
It simplifies the cert part as well.
Yes, that works. Note that because you used wildcard domain, Caddy will try to ask for wildcard certificate, which requires the DNS challenge, which means you’ll have to compile a custom build of Caddy with the plugin of your DNS provider.
Another way to do it is to list all the domains at the top and keep the conditions inside the block the same. Caddy will get individual certificate for each one.
Thanks for your feedback Mohammed.
I did use a custom build of Caddy for my DNS provider which works as intended.
Is the subdomain approach prefered (with individual certificates for all subdomains) ? What are the advantages of both approach ?