How to limit access to domain in VPS, Nginx?

I have a debian VPS with Nginx reversed proxy for my website. And forward DNS domain to my VPS. My question is, how to limit access to public for access my website through domain?

For example, i have domain:

admin.websitename.com

But i want this website is only can access by me and my friend, because this is admin dashboard for login to see all data inside our website.

What method or any tutorial for this? I have already search on Google, but i think my keyword is not correct. Thanks before.

Read more here: Source link