location ~* ^/admin {
auth_basic "Admin page";
auth_basic_user_file /etc/nginx/nginx.pass;
}
LOGIN="admin"
PASSWORD="pass"
OPENSSL=`echo "${PASSWORD}" | openssl passwd -1 -stdin -salt Nginx`
echo "${LOGIN}:${OPENSSL}" >> /etc/nginx/nginx.pass