How to protect a folder by IP address in Nginx
June 20th, 2009
To protect a folder by IP address in nginx is fairly simple, see the example below that demonstrates only allowing access to the /protected folder for people in the 192.168.0.* network.
server {
....
location /protected {
allow 192.168.0.0/24;
deny all;
}
...
}
Categories: nginx
Most People subscribe via RSS Feed
Add to del.icio.us
Stumble It
Pretty cool post. I just stumbled upon your site and wanted to say
that I’ve really enjoyed reading your posts. In any case
I’ll be subscribing to your feed and I hope you post again soon!