default.j2 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. listen 443 ssl spdy;
  5. listen [::]:443 ssl spdy;
  6. ssl_certificate /etc/ssl/fullchain.pem;
  7. ssl_certificate_key /etc/ssl/key.pem;
  8. ssl_session_cache shared:SSL:5m;
  9. ssl_session_timeout 5m;
  10. add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
  11. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  12. ssl_ciphers "AES:!ADH:!AECDH:!MD5:!DSS";
  13. ssl_prefer_server_ciphers on;
  14. server_name _;
  15. root /var/www/html;
  16. index index.html;
  17. location / {
  18. # First attempt to serve request as file, then
  19. # as directory, then fall back to displaying a 404.
  20. try_files $uri $uri/ =404;
  21. gzip_types text/plain text/css application/json application/javascript;
  22. }
  23. location /data {
  24. expires 0;
  25. add_header Cache-Control private;
  26. add_header Vary Accept-Encoding;
  27. access_log off;
  28. gzip_types text/plain application/json;
  29. }
  30. location /maps {
  31. rewrite ^/maps$ https://karte.freifunk-muensterland.de/ permanent;
  32. rewrite ^/maps/(.*)$ https://karte.freifunk-muensterland.de/$1 permanent;
  33. }
  34. }