ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: basic авторизация - как пра вильно?


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: basic авторизация - как пра вильно?
  • From: Alexander Kochetov <alexk@xxxxxxxxxxxxx>
  • Date: Wed, 22 Dec 2010 12:50:01 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=WPb9Vb2gpwKRnQLr+fWx4np9WoEdBZYtDf5NF7YWVuI=; b=ff9TJ+A3cbXdbxA4c2H5GG8OcaP8zmQL7mJaYGU+goxzDJpS49RyzoZrqsiAJM9ywH 6cdmPLajis9ob9eY+5ldbYzurQStszaVzRlM/nezIYZe4QcDIA/pCPrK4JMFNoGWw/h0 rnCPb8L6OSUiWraoeyrVxWyli68u9adC6Nt8Y=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=G7ldPUcmmLFk3A5OfUyLHB2cBjkTVs6QUHQa3sOTTiM+jcyFegKV5Vcf71VkKBq7zl zUpYMRsOo2LcDKrBdOo+eFsRZeDswAprJxn+bdGCueW+qSSC6/Scdfb8V7fjEcX9yLSx zcvSEE1+lQlcTkIVzxsyiO0SWsI8jJXgGQV60=
  • In-reply-to: <4f4186eb38d552bd5b9e7761f6bec2cd.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <AANLkTikuBdSBein96HE4mXbcuSLvSrCjoDyEbif1xtJu@xxxxxxxxxxxxxx> <4f4186eb38d552bd5b9e7761f6bec2cd.NginxMailingListRussian@xxxxxxxxxxxxxxx>

>> Можете сделать примерно
>> так:
>>
>>        location / {...}
>>        location ^~ /protected {
>>            auth_basic            "Protected";
>>            auth_basic_user_file  /home/user/etc/.htpasswd;
>>            location ~ \.php$ {...}
>>        }
>>        location ~ \.php$ {...}
>
>
> location ^~ /protected { - а это зачем? достаточно
> location /protected {

Затем, что в вашем случае запрос /protected/zzz.php
попадёт в
location ~ \.php$ {...}
а не в
location /protected {
        location ~ \.php$ {...}
}
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.