View

Nginx authentication (auth_basic)

  1. # htpasswd file is relative to nginx conf
  2. location  /  {
  3.   auth_basic            “Restricted”;
  4.   auth_basic_user_file  conf/htpasswd;
  5. }

You may also like