Compare commits
3
Commits
c934fe4fca
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4449867af0 | ||
|
|
3afcaaa1c2 | ||
|
|
432db052d5 |
@@ -102,6 +102,7 @@ resource "kubernetes_config_map" "automatic-configmap" {
|
||||
listen_port_80_bool = value.listen_port_80_bool
|
||||
geoip_blocking = value.geoip_blocking
|
||||
geoip_allow = value.geoip_allow
|
||||
redirect_to_root_domain = value.redirect_to_root_domain
|
||||
}) if value.enabled == true
|
||||
}
|
||||
|
||||
|
||||
@@ -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}
|
||||
############################################
|
||||
|
||||
@@ -9,7 +9,7 @@ nginx_sites = {
|
||||
# EOT
|
||||
service = "bitwarden-nginx-svc.bitwarden.svc:8080"
|
||||
http2_bool = true
|
||||
|
||||
redirect_to_root_domain = false
|
||||
}
|
||||
|
||||
bookstack = {
|
||||
@@ -19,28 +19,60 @@ nginx_sites = {
|
||||
proxy_cache = false
|
||||
}
|
||||
|
||||
|
||||
django = {
|
||||
#service = "webserver.django-python.svc:8000"
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
admin = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
redirect = {
|
||||
#enabled = false
|
||||
#main django
|
||||
service = "django-svc.django:8000"
|
||||
#testing django
|
||||
#service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
geoip_allow = ["FR", "GB", "NL"]
|
||||
|
||||
}
|
||||
reverse = {
|
||||
streaming = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
stash = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
simpsons = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
kubernetes = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
cloudmanager = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
podcast = {
|
||||
service = "django-svc.django:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
|
||||
}
|
||||
django-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
@@ -48,13 +80,48 @@ nginx_sites = {
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
admin-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
redirect-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
job-testing = {
|
||||
streaming-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
stash-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
simpsons-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
kubernetes-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
|
||||
cloudmanager-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
}
|
||||
podcast-testing = {
|
||||
service = "django-testing-svc.django-testing.svc:8000"
|
||||
proxy_cache = true
|
||||
http2_bool = true
|
||||
@@ -130,6 +197,7 @@ client_max_body_size 20m;
|
||||
EOT
|
||||
}
|
||||
nextcloud = {
|
||||
redirect_to_root_domain = false
|
||||
service = "webserver.nextcloud.svc"
|
||||
#service = "nextcloud-svc.next.svc"
|
||||
proxy_cache = true
|
||||
@@ -327,6 +395,7 @@ proxy_set_header Connection "upgrade";
|
||||
gitea = {
|
||||
enabled = true
|
||||
service = "webserver.gitea.svc:3000"
|
||||
redirect_to_root_domain = false
|
||||
}
|
||||
|
||||
spider = {
|
||||
|
||||
Reference in New Issue
Block a user