DEV Community

moogoo
moogoo

Posted on

nginx basic auth

Restricting Access with HTTP Basic Authentication | NGINX Plus

server {
    ...
    auth_basic           "Administrator’s Area";
    auth_basic_user_file conf/htpasswd;

    location /public/ {
        auth_basic off;
    }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)