blocking every requests coming to scan wp-content
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 48s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 48s
This commit is contained in:
@@ -19,8 +19,9 @@ data:
|
||||
$status $body_bytes_sent '\n '\"$http_referer\" \"$http_user_agent\"
|
||||
'\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:
|
||||
$geoip2_data_country_iso_code '\n '\"$request\" $status';\n\n\tserver
|
||||
{\n\tlisten 80;\n listen 443 default ssl;\n\tssl_certificate /etc/nginx/ssl/live/default.tryton.geeraert.eu/fullchain.pem;
|
||||
$geoip2_data_country_iso_code '\n '\"$request\" $status';\n\n\tlog_format
|
||||
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 $\n location / {\n proxy_pass http://1.1.1.1;\n
|
||||
\ proxy_redirect off;\n proxy_set_header Host $host;\n
|
||||
|
||||
@@ -35,6 +35,8 @@ http {
|
||||
'Blocked Country: $geoip2_data_country_iso_code '
|
||||
'"$request" $status';
|
||||
|
||||
log_format deny_style 'deny $remote_addr;';
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 default ssl;
|
||||
|
||||
@@ -43,6 +43,11 @@ server {
|
||||
<b style=\"color:red; font-size:18pt; border:2pt solid black; padding:5pt;\">
|
||||
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/ip_audit.log ip_audit;
|
||||
|
||||
Reference in New Issue
Block a user