diff options
Diffstat (limited to 'nginx.conf')
| -rw-r--r-- | nginx.conf | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..2f87043 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,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; + } + } + +} |
