В письме от 8 августа 2016 06:21:14 пользователь 
nNgzlTtv3k5lzmKRvlmS22tSl8sJr68k написал:
>                         if ($http_user_agent ~*
> spider|bot|crawl|megaindex|yahoo){ set $bot_key $server_name; }

Здравствуйте!

Тут весьма плохо использовать if: 
https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/ .

Замените на map:
map $http_user_agent $bot_key {
~spider $server_name;
~bot $server_name;
и т.д.
}

С уважением, Иван.
_______________________________________________
nginx-ru mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Ответить