You are not logged in.

#1 2015-07-08 14:02:58

matt_max
Member
From: Warsaw
Registered: 2013-02-14
Posts: 13

nginx and auth problem

Hi guys,
I need to set up password protected access to different pdf files in one directory. In Apache with .htaccess it was easy:

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /somehere/else/.htpasswd 
AuthGroupFile /dev/null 
<Files 2013_01.pdf>
require valid-user
</Files>
<Files 2013_02.pdf>
require valid-user
</Files>

But I don't know how to do it in nginx. I need defferent password for every file which I create in directory (/srv/http/pdfs/2013_01.pdf; /srv/http/2013_02.pdf and so on). I've tried auth_basic setup but when I enter password for the first file I don't need to do it for the next one. So it is only a partial solution.

Offline

#2 2015-07-08 17:51:38

headkase
Member
Registered: 2011-12-06
Posts: 1,983

Re: nginx and auth problem

I don't know how useful it will be but perhaps: This will help?

Offline

#3 2015-07-08 19:19:13

matt_max
Member
From: Warsaw
Registered: 2013-02-14
Posts: 13

Re: nginx and auth problem

Thx but it's wasn't very useful. When I try to convert my example I get "Could not convert the config". I need a hand from some kind of an nginx wiseman wink

Offline

Board footer

Powered by FluxBB