Add initial bot blocking code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
- name: Start reverse proxy container
|
||||
community.docker.docker_container:
|
||||
name: reverse_proxy
|
||||
image: nginx:mainline-alpine-slim
|
||||
#image: nginx:1.26.2-alpine-slim
|
||||
image: ghcr.io/m5p3nc3r/nginx-keyval:main
|
||||
restart_policy: always
|
||||
volumes:
|
||||
- /etc/reverseproxy/conf.d:/etc/nginx/conf.d
|
||||
|
||||
Reference in New Issue
Block a user