You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.5 KiB
Plaintext

upstream gunicorn {
server web:80;
}
server {
listen 80;
server_name tagesschule.mprofiag.ch;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name tagesschule.mprofiag.ch;
server_tokens off;
sendfile on;
ssl_certificate /etc/letsencrypt/live/tagesschule.mprofiag.ch/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tagesschule.mprofiag.ch/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
add_header X-Frame-Options "";
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 256;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9;
location /static/ {
sendfile on;
alias /app/static_collected/;
}
location /media/ {
sendfile on;
alias /app/data/media/;
}
location / {
proxy_hide_header X-Frame-Options;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_redirect off;
proxy_pass http://gunicorn;
}
}