On Sat, May 29, 2021 at 07:46:40PM +0530, Amila Gunathilaka wrote: Hi there,
> My concern is why nginx still gives 401 responses *unless *my nginx.conf > has a basic authentication user name and password file in the > location /etc/nginx/.htpasswd. > > It says still not authenticate my external client POST requests yet ? Any > thoughts? I'm not sure I understand your question. "auth_basic" says "for each each request to nginx, if the user/password in the request does not match something in the file, nginx should return 401" If you want nginx to do authentication checks, you want auth_basic and auth_basic_user_file, If you do not want nginx to do authentication checks, you do not want auth_basic. http://nginx.org/r/auth_basic (You can use "auth_basic off;" if you want one location{} not to use auth_basic that would be inherited from a surrounding context.) If that does not tell you what you want, could you explain again, please? Thanks, f -- Francis Daly fran...@daoine.org _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx