Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to password prompt over and over

$
0
0
I've got several directories with pdf files inside:
/srv/http/A_1
-->/srv/http/A_1/01.pdf
-->/srv/http/A_1/02.pdf

/srv/http/A_2
-->/srv/http/A_2/01.pdf
-->/srv/http/A_2/02.pdf

I need to setup defferent password for every file which I create in directory. I've tried to use auth_basic with "location" directive but when I enter password for the first file I don't need to do it for the next one. When I click there is no password prompt and file open without any problems. So it is only a partial solution.
Just to be clear I need to do something like this in nginx:
1) I open html page with links to pdf files,
2) click on link, password prompt appears,
3) if login and password is correct I can download pdf file,
4) click on the next link and I've got password prompt again... and so on.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>