Website access restriction using nginx

You can restrict access to certain part of your website using nginx’s inbuilt authentication and authorization mechanism based either on your client’s I.P, by prompting for a login prompt or both. A sample I.P. based authorization configuration would be like: location /private/ { allow; allow; allow; deny all; } Note: In above example