Trying to use Nginx to password protect
mysite.com/admin
the thing is here that I'm using a web framework, and /admin is just another configured route in the system NOT a real directory
when I configured the site with:
location /admin {
auth_basic "Administrator Login";
auth_basic_user_file /usr/share/nginx/html/mysite.com/.htpasswd;
}
and generated the htpasswd file, when I try to access the /admin, I get presented with login prompt, and it works great. But now any time I access the path, I get a 404 Not Found from Nginx itself
Anything I should do differently?
Thanks!