# Trying to use and understand satisfy any

**URL:** <https://www.ruby-forum.com/t/trying-to-use-and-understand-satisfy-any/202007>\
**Category:** NGINX\
**Created:** [January 20, 2011, 12:13am UTC](https://www.ruby-forum.com/t/trying-to-use-and-understand-satisfy-any/202007 "2011-01-20T00:13:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 20, 2011, 12:13am UTC](https://www.ruby-forum.com/t/trying-to-use-and-understand-satisfy-any/202007/1 "2011-01-20T00:13:19Z")

</div>

Hi,

Trying to do something like this:

server  
{  
listen…  
server\_name…  
root…  
location /  
{  
satisfy any;  
allow 1.2.3.4;  
deny all;  
auth\_basic “closed site”;  
auth\_basic\_user\_file conf/userFile;  
index index.php;  
error\_page 404 = @processphp;  
error\_page 403 = @redirect\_to\_other\_www;  
}  
}

If I do not include the “auth\_basic” elements and I’m accessing the site  
from an allowed IP address, I get redirected to another www site per the  
@redirect\_to\_other\_www block. If use the “auth\_basic” elements but  
click on  
“Cancel” to make the browser’s authentication box close, I stay on the  
site  
until I click on a link on the site at which time I’m redirected.

Is there a way to no preload the site so that if the user cancels the  
authentication request, they don’t even see anything?

Thanks
