yicr
12/29/2019 - 12:18 PM

Nginx : Tips / Add basic authentication without ip

Location directive.

        location / {
            satisfy any;
            allow 10.10.10.1;
            deny all;
            auth_basic "basic authentication";
            auth_basic_user_file /www/.htpasswd;
        }