When you want to secure specific URL or route, you can configure Basic auth using Nginx. First install apache2-utils as apt dependency. You can add usernames to .htpasswd by running the following command. The username we’ve chosen is alice, of course, change this to fit your requirements. Next, we’ll need to add a hashed password to the user …





