1. My Caddy version (caddy version
):
~ # ./caddy version
v2.0.0-rc.3 h1:z2H/QnaRscip6aZJxwTbghu3zhC88Vo8l/K57WUce4Q=
2. How I run Caddy:
a. System environment:
Ubuntu 18.04
b. Command:
./caddy adapt --config Caddyfile --pretty --validate
d. My complete Caddyfile or JSON config:
{
debug
}
@all_hosts {
remote_ip 0.0.0.0/0
}
@lan_hosts {
remote_ip 192.168.10.0/24 192.168.20.0/24
}
http://site2.example.com:19500 {
reverse_proxy * localhost:8081
}
3. The problem I’m having:
I am slowly building my JSON config file by turning a Caddy file into JSON, I now wanted to add IP filtering. The idea is that a named matcher would in one case allow everyone (0.0.0.0/0
) and in the other only my LAN IP ranges:
When trying the Caddyfile above I get an error aboute remote_ip
not being recignized
4. Error messages and/or full log output:
./caddy adapt --config Caddyfile --pretty --validate
adapt: Caddyfile:6: unrecognized directive: remote_ip
Is there something specific I need to do to have this directive recognized?