upload mdified files

This commit is contained in:
2024-07-28 21:56:52 +01:00
parent 8b9c11d383
commit 22e2c141fc
3 changed files with 122 additions and 67 deletions
+35 -27
View File
@@ -1,47 +1,55 @@
############################################
# config file for django
############################################
upstream django_backend {
server webserver.django-python.svc:8000;
server 1.1.1.1 backup;
server webserver.django-python.svc:8000;
server 1.1.1.1 backup;
}
server {
server_name django.tryton.geeraert.eu www.django.tryton.geeraert.eu;
server_name django.tryton.geeraert.eu www.django.tryton.geeraert.eu;
location / {
proxy_pass http://django_backend;
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;
}
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;
root /var/www/certbot;
}
listen 443 ssl; # managed by Certbot
http2 on;
http2 on;
ssl_protocols TLSv1.2;
listen 443 ssl;
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 = www.django.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
}
if ($host = 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;
}
server_name www.django.tryton.geeraert.eu django.tryton.geeraert.eu;
listen 80;
return 404; # managed by Certbot
listen 80;
return 404;
}