# Umleitung von HTTP-Anfragen auf HTTPS # server { listen 80; server_name www.linux-magazin.de; root /var/www/www.linux-magazin.de; index index.html index.htm; # Let's Encrypt Challenge # location ~ /.well-known { allow all; } location / { rewrite ^/(.*)$ https://www.linux-magazin.de/$1 permanent; rewrite ^/$ https://www.linux-magazin.de/ permanent; } } # HTTPS-Konfiguration # server { listen 443 ssl http2; server_name www.linux-magazin.de; # Letsencrypt-SSL-Zertifikate ssl_certificate /etc/letsencrypt/live/www.linux-magazin.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.linux-magazin.de/privkey.pem; # Connection-Credentials cachen ssl_session_cache shared:SSL:20m; ssl_session_timeout 180m; root /var/www/www.linux-magazin.de/current; index index.html index.htm; # Brotli-Settings # brotli on; brotli_comp_level 5; brotli_static on; brotli_types text/html text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/vnd.microsoft.icon image/bmp image/svg+xml; location / { try_files $uri $uri/ =404; } }