add the files

This commit is contained in:
2024-07-25 17:06:25 +01:00
parent cda1d12883
commit 3b67e1b3c6
7 changed files with 276 additions and 138 deletions
+47
View File
@@ -0,0 +1,47 @@
upstream django_backend {
server webserver.django-python.svc:8000;
server 1.1.1.1 backup;
}
server {
server_name django.tryton.geeraert.eu www.django.tryton.geeraert.eu;
location / {
proxy_pass http://django_backend;
location ~* \.(html|css|jpg|gif|ico|js)$ {
proxy_cache cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 301 302 30m;
expires 30m;
proxy_pass http://django_backend;
}
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
listen 443 ssl; # managed by Certbot
http2 on;
ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem;
}
server {
if ($host = www.django.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = django.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name www.django.tryton.geeraert.eu django.tryton.geeraert.eu;
listen 80;
return 404; # managed by Certbot
}