I have a login for phpMyAdmin on Nginx:
location /hiddenpath { auth_basic "Admin"; auth_basic_user_file passwordfile; }