While setting up a new website, I wanted to work on articles and tweaking things before actually launching to the public, so I needed a simple way to keep everybody else out until it was all ready to go. So I used the nginx access control feature to accomplish it.
Full article