Restricting Access with HTTP Basic Authentication in Apache and Nginx
You can restrict access to your website or some parts of it by implementing a username/password authentication. Usernames and passwords are taken from a file created and populated by a password file creation tool, for example, apache2-utils. Creating a Password File Create additional user-password pairs. Omit the -c flag because the file already exists Nginx configuration location /public/ { auth_basic off; } } ...