nginx to white-list ip or ask for password

Let, you want to protect a page or any site in nginx by certain IP addresses access only. How would you do it in nginx? I will discuss some cases here about the situation.

Continue reading nginx to white-list ip or ask for password