Hello All!
Is it possible to turn authentication on and off for a specific user agent in some location? When I configure the following
location /specloc/ {
if ($http_user_agent ~ MSIE) {
auth_basic "private area";
auth_basic_user_file /etc/nginx/htpasswd;
}
#...
}
my "nginx -t" prints
nginx: [emerg] "auth_basic" directive is not allowed here in /etc/nginx/nginx.conf:75
nginx: configuration file /etc/nginx/nginx.conf test failed
Thank you if you answer.