Category: Web Servers

This code allows me to password protect a site and only allow it to be accessed either by supplying the correct password defined in your.pwd OR if it is called by PayPal. that's the code I had to use for on the staging environment on one of my products (MiniAds).

[code]
location / {
satisfy any;

allow 192.168.1.0/32;

# PayPal servers ; 2014-10-21
allow 66.211.170.66;
allow 216.113.188.202;
allow 216.113.188.203;
allow 216.113.188.204;

deny  all;

auth_basic  "Restricted";
auth_basic_user_file  /var/www/pwd/your.pwd;

index  index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
}
[/code]

test
nginx -t

Rreload configuration
nginx -s reload

 

Related: https://www.paypal-community.com/t5/Merchant-services-Archive/IPN-server-s-ip-s/td-p/126274

Join our mailing list

Get important news about cool products we release and invitations to beta test new products

Find out the Social networks we're on