Welcome! Log In Create A New Profile

Advanced

Re: Problem with auth_basic and auth_basic_user_file

Maxim Dounin
June 23, 2014 10:38PM
Hello!

On Mon, Jun 23, 2014 at 03:26:14PM -0400, Varix wrote:

> Hallo,
>
> I want a login for this location.
>
> location /TEST/ {
> alias /www/c2c/;
> }
>
> With
>
> location /TEST/ {
> alias /www/c2c/;
> auth_basic "Test Auth";
> }
>
> no username/password box in the browser. I see the index.html site from the
> c2c folder

This is expected. Both auth_basic and auth_basic_user_file must
be set for auth_basic to work.

> With
>
> location /TEST/ {
> alias /www/c2c/;
> auth_basic "Test Auth";
> auth_basic_user_file /nginx/conf/htpasswd;
> }
>
> and an "404 Not Found" error shows the browser.

This likely indicate you have some error_page's configured, and
they intercept "401 Unauthorized" returned. Try looking into your
configs and into error log.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with auth_basic and auth_basic_user_file

Varix June 23, 2014 03:26PM

Re: Problem with auth_basic and auth_basic_user_file

Maxim Dounin June 23, 2014 10:38PM

Re: Problem with auth_basic and auth_basic_user_file

Varix June 24, 2014 11:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
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