1. Caddy version (
2. How I run Caddy:
a. System environment:
Ubuntu Server 18.04 LTS
systemctl start caddy
c. Service/unit/compose file:
Same as official doc in dist/caddy.service at master · caddyserver/dist · GitHub
d. My complete Caddyfile or JSON config:
3. The problem I’m having:
I am doing reverse proxy. I want to allow certain IPs to have access to the web interface on port 8080, and reject others (may return 403 not allowed). How to achieve it ?
The counterpart of config in nginx server is
4. Error messages and/or full log output:
5. What I already tried:
remote_ip <ip1> <ip2> <ip3>
The error says
unrecognized directive: remote_ip
6. Links to relevant resources:
remote_ip is not a directive, it’s a matcher.
And read about the named matcher syntax here:
You’d use it something like this:
@blocked not remote_ip <ip1> <ip2> <ip3>
respond @blocked "Nope" 403
This topic was automatically closed after 30 days. New replies are no longer allowed.