1. The problem I’m having:
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):
(inttls) {
tls /certs/abs.com/fullchain.cer /certs/abs.com/abs.com.key
}
sub1.abs.com {
import inttls
@denied not remote_ip 192.168.0.1/24 192.168.1.1/24
abort @denied
reverse_proxy 172.16.88.1:8080
}
sub2.abs.com {
import inttls
@denied not remote_ip 192.168.0.1/24 192.168.1.1/24
abort @denied
reverse_proxy 172.16.88.2:8080
}
sub3.abs.com {
import inttls
@denied not remote_ip 192.168.0.1/24 192.168.1.1/24
abort @denied
reverse_proxy 172.16.88.3:8080
}
sub4.abs.com {
import inttls
@denied not remote_ip 192.168.0.1/24 192.168.1.1/24
abort @denied
reverse_proxy 172.16.88.4:8080
}
2. Error messages and/or full log output:
N.A.
3. Caddy version:
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
NA
a. System environment:
NA
b. Command:
NA
c. Service/unit/compose file:
NA
d. My complete Caddy config:
NA
5. Links to relevant resources:
NA