Блокировка referal-spam в nginx
Posted: Tue Oct 13, 2015 11:59 am
Для блокировки referal-spam добавляю в nginx.conf
После попытки перезапуска выдает
Помогите разобраться где я завис.
Code: Select all
if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|poker|porn|sex|teen) )
{
return 403;
}
Code: Select all
nginx: [emerg] "if" directive is not allowed here in /etc/nginx/nginx.conf:74
nginx: configuration file /etc/nginx/nginx.conf test failed