add changes
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m38s

This commit is contained in:
2026-09-02 11:56:10 +01:00
parent 432db052d5
commit 3afcaaa1c2
2 changed files with 16 additions and 20 deletions
+15 -20
View File
@@ -8,7 +8,6 @@ upstream ${name_site}_backend {
}
%{~ if redirect_to_root_domain = False~}
server {
server_name ${name_site}.tryton.geeraert.eu www.${name_site}.tryton.geeraert.eu;
%{ if geoip_blocking}
@@ -19,6 +18,19 @@ server {
}
%{ endif }
%{~ if redirect_to_root_domain~}
if ($host = www.${name_site}.tryton.geeraert.eu) {
return 301 https://${name_site}.geeraert.eu$request_uri;
}
if ($host = ${name_site}.tryton.geeraert.eu) {
return 301 https://${name_site}.geeraert.eu$request_uri;
}
%{~ endif ~}
%{ if redirect_to_root_domain != true }
location / {
proxy_pass %{ if proxy_pass_https}https%{else}http%{ endif }://${name_site}_backend;
proxy_set_header Upgrade $http_upgrade;
@@ -56,6 +68,8 @@ server {
# return 444;
#}
%{ endif }
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;
@@ -95,29 +109,10 @@ server {
}
%{~ endif ~}
%{~ endif ~}
%{~ if redirect_to_root_domain~}
server {
if ($host = www.${name_site}.tryton.geeraert.eu) {
return 301 https://${name_site}.geeraert.eu$request_uri;
}
if ($host = ${name_site}.tryton.geeraert.eu) {
return 301 https://${name_site}.geeraert.eu$request_uri;
}
server_name www.${name_site}.tryton.geeraert.eu ${name_site}.tryton.geeraert.eu ;
listen 80;
return 404;
}
%{~ endif ~}
############################################
# config file for ${name_site}
############################################