Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Проблема с фильтрацией по запросам
- To: nginx-ru@xxxxxxxxx
- Subject: Re: Проблема с фильтрацией по запросам
- From: AlexeyK <itsmegawtf@xxxxxxxxx>
- Date: Fri, 8 Jun 2007 13:04:16 +0300
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nevIYZa3uhmRacyI5aM50OBdktIZIRBwis6OBtzt21TQ+D+miKNBtknViXiWVUxTQHcIbmqZOWwyBiSNGYqN6lf1ngVp8D4qH6SryTkAtII5vbMAhstOpQ/njrJZqNqG4rL/iluX/sJNNfRVHxDTJR9Ce2F1J0hxhNRkH7EGvk8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=E5LhHfA9qjIYtMsKaKluHHUitg+pJSiiFAj18wqfUFnf0NRS411CnWzIZMTOlo2na5grNj64o0F2ZadJ9WIvryQJgHYFF50gs8a3TRWBsOoVnd1Zrfd2GHkeyl9t2Gv8KAmRaQKVOGdi/6XLn7Yw2rnYgpBusSxeU55IlI1xLAA=
- In-reply-to: <6fdcb1fc0706080245n3abaa954i98fde77fa8538f06@xxxxxxxxxxxxxx>
- References: <6fdcb1fc0706080245n3abaa954i98fde77fa8538f06@xxxxxxxxxxxxxx>
2007/6/8, Alex Gakel <crazysqwad@xxxxxxxxx>:
Необходимо сделать фильтрацию по 3-м запросам:
1. POST /
2. HEAD /
3. GET /?qwertyqwertyqwerty
Необходимо на такие запросы выдавать ошибку 403. без проксирования на
Apache.
Прописыванием if добиться не удается. Оч. нужна помощь.
Конфиг такой:
server {
listen 89.111.180.163:80;
server_name foto.rock-zone.ru;
#charset koi8-r;
access_log
/home/savel/home/savel/foto.rock-zone.ru/logs/access_log
combined;
location / {
proxy_pass http://foto.rock-zone.ru:7777;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
# Static files location
location ~*
^.+\.(jpg|jpeg|gif|png|ico|mp3|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|dat|avi|ppt|txt|tar|mid|midi|wav|bmp|rtf|wmv|mpeg|mpg|tbz|js)$
{
root /home/savel/home/savel/foto.rock-
zone.ru/docs;
}
}
ДДОСят? :)
location = /index\.php$ {
if ($request_method = POST) {
deny all;
}
}
дальше, думаю, сами поймете...
|