ПРОЕКТЫ 


  АРХИВ 


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: Вопрос по auth_basic.


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: Вопрос по auth_basic.
  • From: Sergey Shepelev <temotor@xxxxxxxxx>
  • Date: Tue, 7 Jul 2009 16:07:19 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=dQrtAtEV+rQ3AenO3xdydCmVo6TBhQYHgKjbDirFnSg=; b=vo4uCLDdRSoV3pdDN9GiuceI9IRRvY49VImaBcn2WXRhFLzFQ3Q4v1l4un9deXlDYv hqWuG+vjmcFmERGiCLN+hfkNLRiK0sVTM6oImuiN4g271Ux34oijyQT0vo3R+UsyLhwl fXZZIgJjQdbglHN422DcZs+HcB+6493Wdmpu4=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=nAht5gMkiGjYOE4ccEEHtet2R5ZEpZJtKal3IS4/2vZHRr2VwoB/tVAZX0ZlNMKb8O St5Mgo5MGuPvqbkpD0fqTO0mceg/pywvrWdVSFkwywe1jxUe364X3A3MZ0N/WKHLtOD+ fsbC69lF+hRuZC0bGHDCHm47APwvHYzIbKzjQ=
  • In-reply-to: <87C68D15908E4A258D1D1DBF6A08B260@maxhl>
  • References: <87C68D15908E4A258D1D1DBF6A08B260@maxhl>

Локейшны проверяются в алфавитном порядке. Вы можете писать что угодно
в /stats. Если он идёт после /, то отработает /.

Это, кстати, еще одна хорошая причина привыкать писать location = / {
настройки для корня }

2009/7/7  <maxhl@xxxxxxxxxxxxxx>:
> День добрый.
> Почему если есть:
>
>   location / {
>       auth_basic            "closed site";
>       auth_basic_user_file  /home/htdocs/.ht_passwd;
>       index index.pl;
>    }
>
> И после идет:
>
>    location /stats {
>          auth_basic            "closed site";
>        auth_basic_user_file  /home/htdocs/stats/.ht_passwd;
>        index index.pl;
>        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
>        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
>        fastcgi_pass    unix:/mnt/md0/nginx-fcgi.sock;
>        fastcgi_index    index.pl;
>        include  /usr/local/nginx/conf/fastcgi.conf;
>    }
>
> То при запросе в /stats проверяет пользователя /home/htdocs/.ht_passwd; и
> если нет то отдает
>
> HTTP request sent, awaiting response... 401 Unauthorized
> Authorization failed.
>
> И в /home/htdocs/stats/.ht_passwd; даже не проверяет ...
> Как можно правильно разделить location ?
> ____________________________
> С уважением Max ICQ 71006063
>
>
>


 




Copyright © Lexa Software, 1996-2009.