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; } } }