blocking every requests coming to scan wp-content
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 48s

This commit is contained in:
2026-03-13 10:06:27 +00:00
parent 3570e436f8
commit a378e0a41d
3 changed files with 10 additions and 2 deletions
+3 -2
View File
@@ -19,8 +19,9 @@ data:
$status $body_bytes_sent '\n '\"$http_referer\" \"$http_user_agent\" $status $body_bytes_sent '\n '\"$http_referer\" \"$http_user_agent\"
'\n '$geoip2_data_city_name $geoip2_data_country_name';\n\tlog_format '\n '$geoip2_data_city_name $geoip2_data_country_name';\n\tlog_format
blocked_fmt '$http_host \\t $remote_addr - [$time_local] '\n\t\t'Blocked Country: blocked_fmt '$http_host \\t $remote_addr - [$time_local] '\n\t\t'Blocked Country:
$geoip2_data_country_iso_code '\n '\"$request\" $status';\n\n\tserver $geoip2_data_country_iso_code '\n '\"$request\" $status';\n\n\tlog_format
{\n\tlisten 80;\n listen 443 default ssl;\n\tssl_certificate /etc/nginx/ssl/live/default.tryton.geeraert.eu/fullchain.pem; deny_style 'deny $remote_addr;';\n\n\tserver {\n\tlisten 80;\n listen 443
default ssl;\n\tssl_certificate /etc/nginx/ssl/live/default.tryton.geeraert.eu/fullchain.pem;
# managed by$\n ssl_certificate_key /etc/nginx/ssl/live/default.tryton.geeraert.eu/privkey.pem; # managed by$\n ssl_certificate_key /etc/nginx/ssl/live/default.tryton.geeraert.eu/privkey.pem;
# managed $\n location / {\n proxy_pass http://1.1.1.1;\n # managed $\n location / {\n proxy_pass http://1.1.1.1;\n
\ proxy_redirect off;\n proxy_set_header Host $host;\n \ proxy_redirect off;\n proxy_set_header Host $host;\n
+2
View File
@@ -35,6 +35,8 @@ http {
'Blocked Country: $geoip2_data_country_iso_code ' 'Blocked Country: $geoip2_data_country_iso_code '
'"$request" $status'; '"$request" $status';
log_format deny_style 'deny $remote_addr;';
server { server {
listen 80; listen 80;
listen 443 default ssl; listen 443 default ssl;
+5
View File
@@ -43,6 +43,11 @@ server {
<b style=\"color:red; font-size:18pt; border:2pt solid black; padding:5pt;\"> <b style=\"color:red; font-size:18pt; border:2pt solid black; padding:5pt;\">
You are banned!</b></center>"; You are banned!</b></center>";
} }
location ^~ /wp-content {
# Logs the IP in "deny IP;" format to your specific file
access_log /etc/nginx/blacklisted.d/blacklisted-sessions.conf deny_style;
return 444;
}
access_log /var/log/nginx/access.log my_custom_format; access_log /var/log/nginx/access.log my_custom_format;
access_log /var/log/nginx/ip_audit.log ip_audit; access_log /var/log/nginx/ip_audit.log ip_audit;