1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
system service
a. System environment:
Ubuntu Server 18.04 LTS
b. Command:
systemctl start caddy
c. Service/unit/compose file:
Same as official doc in dist/init/caddy.service at master · caddyserver/dist · GitHub
d. My complete Caddyfile or JSON config:
my.website {
reverse_proxy 127.0.0.1:8080
}
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
allow <ip1>;
allow <ip2>;
deny all;
4. Error messages and/or full log output:
Not applicable
5. What I already tried:
set remote_ip
directive
my.website {
reverse_proxy 127.0.0.1:8080
remote_ip <ip1> <ip2> <ip3>
}
The error says unrecognized directive: remote_ip