#install tolls apt install apache2-utils -y #add user htpasswd -c /etc/nginx/.htpasswd myuser #change nginx configuration location / { auth_basic "Restricted Content"; auth_basic_user_file /etc/nginx/.htpasswd; root /var/www/html; index index.html index.htm; }