nginx-errors icon indicating copy to clipboard operation
nginx-errors copied to clipboard

401 error page not loaded, set auth_basic off;

Open pgassmann opened this issue 3 years ago • 0 comments

if auth_basic is enabled, the default 401 error page will be shown, not the styled one.

to fix this, the error locations should have auth_basic off;

nginx-errors.conf:

...

location ^~ /nginx-errors/errors/ {
    auth_basic off;
    ssi on;
    internal;
    root /usr/share/nginx/html;
}

location ^~ /assets/css/style.css {
    auth_basic off;
    root /usr/share/nginx/html/nginx-errors/errors;
}

location ~* montserrat-(400|700).(eot|woff2|woff|ttf|svg) {
    auth_basic off;
    root /usr/share/nginx/html/nginx-errors/errors;
}

pgassmann avatar Jan 20 '22 15:01 pgassmann