My question is similar to Password protect a specific URL except I'm trying to achieve this in Nginx instead of Apache.
Please suggest way to do it. It's a url with dynamic content, not a file.
My question is similar to Password protect a specific URL except I'm trying to achieve this in Nginx instead of Apache.
Please suggest way to do it. It's a url with dynamic content, not a file.
This should work. Look at module to find out passwd file format. Basically Apache's one will be good.
location /protected/path {
auth_basic "closed site";
auth_basic_user_file conf/htpasswd;
}