1. Caddy version (caddy version
):
v2.4.5
2. How I run Caddy:
Running in a docker container.
Used the following image using latest tag: Docker
a. System environment:
Ubuntu 20.04.3 LTS host
Docker version: 20.10.8
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
uptime.itss.com.au {
reverse_proxy localhost:3001 {
remote_ip 122.230.17.30/32
}
}
3. The problem I’m having:
When I run sudo caddy validate I get the below error message and it doesn’t restrict to my IP address:
validate: adapting config using caddyfile: parsing caddyfile tokens for ‘reverse_proxy’: Caddyfile:9 - Error during parsing: unrecognized subdirective remote_ip
4. Error messages and/or full log output:
validate: adapting config using caddyfile: parsing caddyfile tokens for ‘reverse_proxy’: Caddyfile:9 - Error during parsing: unrecognized subdirective remote_ip
5. What I already tried:
- Tried reformatting with sudo caddy fmt
- Tried to use remote_addr instead as I found that on some caddy forum posts