Add initial bot blocking code

This commit is contained in:
2025-01-07 12:44:43 +00:00
parent e9d72bf2e0
commit c0d44b0d83
2 changed files with 14 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
# Create a map of known attack locations
map $request_uri $block_uri {
default 0;
~*/wp-.* 1;
~*\.env 1;
/etc 1;
}
# Webserver
server {
listen 80;
@@ -10,6 +18,10 @@ server {
server_name apptabulous.co.uk www.apptabulous.co.uk;
if ($block_uri = 1) {
return 403;
}
location / {
proxy_pass http://rpi4-2:3000;
}