|
|
|
|
АРХИВ :: 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: Александр Сытар <sytar.alex@xxxxxxxxx>
- Date: Tue, 1 Dec 2009 11:54:44 +0300
- 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 :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=/q8IVeZTqVT1ePEAu/W+80iX4o4N6/+aoIXaSPYSY+o=; b=TisviRBrKVovFQs/u++uGhiDf5cVcXy8XKskRKep3h6Dh9FWfWppawGRWrF9JrKYBm BLpAUExrDyvdXGGfsKkqfH1G0v6uDkur4kGHdHj1uvBp38LaaDHXj9ezT6f26X49BjTW n66eYalv6vPyEgebFs41vmG6AJstePIDsUacQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=MhvlyLOqDCoxO6DbuUPtkYPgPtgi3/XNAVJJwMMdt4k+xYbnm5NJs5qCN25HStV97R Fndpu91v38XkocXzX/BE18FLff7PPtYCmfYkafOlm2qbOxYVydxTbRAbmX2Jl8kuBNvW x16eXNjmjVnF6mxqNZvclXhtxxO4uA7lV5gZU=
- In-reply-to: <20091130213315.GN33752@xxxxxxxxxx>
- References: <3fe5d4de0911301239r203c9c7bp9dff9b046c44026e@xxxxxxxxxxxxxx> <20091130213315.GN33752@xxxxxxxxxx>
Спасибо, Максим. Я сделал нечто вроде такого:
location = / {
rewrite ^ /index.php/ last;
}
location = /index.php {
rewrite ^ /index.php/ last;
}
location /admin {
auth_basic "Restricted zone";
auth_basic_user_file .htpasswd;
root /usr/share/nginx/www;
try_files $uri /index.php$uri;
}
location / {
try_files $uri /index.php$uri;
}
location /index.php {
internal;
root /usr/share/nginx/www;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_read_timeout 180;
fastcgi_param COUNTRY $country;
fastcgi_ignore_client_abort on;
fastcgi_buffers 300 5K;
include fastcgi_params;
}
Вроде работает как надо. Для /index.php/admin - посылает 404.
p. s. Забыл отключить.
2009/12/1 Maxim Dounin <mdounin@xxxxxxxxxx>
>
> /index.php/
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|
|
|