All files from this thread

File Name File Size   Posted by Date  
image.png 135 KB open | download amiladevops 05/29/2021 Read message
Francis Daly
June 01, 2021 03:08AM
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.

(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?


Francis Daly
nginx mailing list
Subject Author Posted

Re: nginx Digest, Vol 139, Issue 29 Attachments

amiladevops May 29, 2021 10:18AM

Re: Help: Using Nginx Reverse Proxy bypass traffic in to a application running in a container

Francis Daly June 01, 2021 03:08AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready