I have a whitelist of IPs for nginx, but in addition to this I want to require basic authentication for specific IP.
For example, allow access for these IPs:
198.51.100.1
198.51.100.2
require basic authentication for this IP:
198.51.100.3
and deny for anyone else.
How is this possible? satisfy
directive doesn't seem to solve this problem
Best Answer
You could implement this with the GEO directive: http://nginx.org/en/docs/http/ngx_http_geo_module.html#geo
Just a sketch using your ip address examples: