Restrict URL access with pwd

Hi all,

How can I restrict access to my website with a password like with a
.htaccess file please?

Thanks

For example:

http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html

Posted at Nginx Forum: