redirects log

cat nginx-forum at nginx.us
Wed Sep 16 15:32:28 MSD 2009


Здравствуйте, дорогая редакция.
так сложилось, что мне необходимо банить запросы на сервер по параметру из query string.
на данный момент это выглядит так:


server
        {
                listen 80;
                ....
                if ($arg_IP = 192.168.1.2){rewrite ^ /banned.html;}
                if ($arg_IP = 192.168.1.3){rewrite ^ /banned.html;}
                if ($arg_IP = ... ){rewrite ^ /banned.html;}
               ......
          }


единственное, чего мне не хватает - логи доступа с забаненных IP.


log_subrequest on;

The directive enables or disables messages in access_log about sub-requests such as rewrite rules and/or SSI requests. 
включил, но ничего нового в логах не нашел.

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,7206,7206#msg-7206






More information about the nginx-ru mailing list