The ngx_http_auth_basic_module allows a server to be protected using basic auth (for example staging/demo sites).
It would be nice to be able to configure a user/password using env variables and/or add a password file.
https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html