blob: 2f870436dfadb39ab34bfe053414723f4d1ac820 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
http {
lua_shared_dict banned_ips 10m;
lua_shared_dict limits 2m;
map $http_user_agent $is_bot {
default 0;
~*googlebot|yandex|bingbot|baiduspider|mail.ru_bot|ia_archiver|facebot|facebookexternalhit|twitterbot|://google.com|ahrefsbot|semrushbot|telegrambot|vkshare|whatsapp 1;
}
server {
listen 443 ssl;
server_name test.ru;
server_tokens off;
location ~* /(wp-content|wp-includes|wp-admin|wp-login\.php|xmlrpc\.php|\.git|\.env|vendor|phpmyadmin|adminer\.php|\.htaccess|config\.init) {
access_log off;
log_not_found off;
return 444;
}
location / {
access_log off;
access_by_lua_file /home/example.lua;
}
}
}
|