Question about redirect?

Maxim Dounin mdounin at
Sat Jul 31 01:55:05 MSD 2010


On Thu, Jul 22, 2010 at 12:08:16PM +0200, Slask Sklask wrote:

> Firstly I'm a newbie on both mailing lists AND nginx so please be nice to me
> :D
> I use nginx as a reverse proxy and it works flawlessly.
> But now I want to put basic authentication on certain ip addresses.
> IE.
> If I come from network it should go through as usual.
> But if I come from it should have basic authentication.
> Is there any way to accomplish this?

location / {
    satisfy any;

    deny   all;

    auth_basic            "closed site";
    auth_basic_user_file  conf/htpasswd;

Most relevant link is:

Directive "satisfy_any" was replaced by "satisfy" in 0.6.25.  
Somebody have to fix wiki.

Maxim Dounin

More information about the nginx mailing list