Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auth_request & http_access
- To: nginx-ru@xxxxxxxxx
- Subject: Re: auth_request & http_access
- From: Konstantin Svist <fry.kun@xxxxxxxxx>
- Date: Thu, 04 Nov 2010 16:02:42 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ENZ/J4KTFmXNzrcBIrz7HFZ4ByINXPb0nruLxo4vL0M=; b=g56++Ta6HKb+ZwvpfSTvND6yZdINub72ht5B5yzPldpIeFAfYkhnt29QgZgQ+uv0oB d7yB7qMp3dqXj2dfGIu+c1JnMzShiqZPhMU3cLy8GI3eeIHSWILrerqqokt6VRpqra4w VynNEaJEPGO538+WuynljnwwYh3TkHAExpUYI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=DHny8Ykfed9Q2Tf4piFAS2pWFL4eUSPRhSUhLPWg8T93DvDVlMvDKRfX1cY9Uw/iT8 N2SevY049nMi101wjKWwbgJ8VfxfXm0lXpejqDoSVDSY7xrw+dy4zkW4PNPQRx6yaJ7o g7y2LXW4kuvCPeJ2xgewNehnPlLsR3ETlLrPQ=
- In-reply-to: <4CD0C0A0.2020101@xxxxxxxxx>
- References: <4CD0C0A0.2020101@xxxxxxxxx>
Пришлось так писать:
location /foo {
if ($remote_addr !~ ^192\.168\.[0-7].*$) {
rewrite ^(.*) https://<login page>$1 redirect;
}
auth_request /auth/;
error_page 403 = @go_login;
root /var/www/foo;
}
On 11/02/2010 06:53 PM, Konstantin Svist wrote:
Конфиг:
location /foo {
allow 192.168.0.0/24;
deny all;
auth_request /auth/;
error_page 403 = @go_login;
root /var/www/foo;
}
Почему-то идёт запрос на /auth/ даже когда IP не совпадает с 192.168.0.*
Как бы такое запретить?
Спасибо заранее
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|