Restricting Access with HTTP Basic Authentication | NGINX Documentation
Control access using HTTP Basic authentication, and optionally in combination with IP address-based access control.