success with geoip2
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 50s

This commit is contained in:
2026-03-13 00:33:43 +00:00
parent 2ea483265b
commit 3570e436f8
4 changed files with 70 additions and 48 deletions
+13
View File
@@ -9,6 +9,12 @@ upstream ${name_site}_backend {
server {
server_name ${name_site}.tryton.geeraert.eu www.${name_site}.tryton.geeraert.eu;
if ($allowed_country = no) {
return 444; # Forbidden
# Or use 'return 444;' to close the connection without a response
# The 444 Status: If you want to save bandwidth and "ghost" attackers, use return 444;. It drops the connection immediately without even sending a "Forbidden" header.
}
location / {
proxy_pass %{ if proxy_pass_https}https%{else}http%{ endif }://${name_site}_backend;
proxy_set_header Upgrade $http_upgrade;
@@ -31,10 +37,17 @@ server {
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location @f2b-banned {
default_type text/html;
return 403 "<br/><center>
<b style=\"color:red; font-size:18pt; border:2pt solid black; padding:5pt;\">
You are banned!</b></center>";
}
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/backend_debug.log backend_debug;
access_log /var/log/nginx/blocked_countries.log blocked_fmt if=$should_log_blocked;
${extra-value}
%{~ if http2_bool~}
http2 on;