wekan.conf 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. map $http_upgrade $connection_upgrade {
  2. default upgrade;
  3. '' close;
  4. }
  5. upstream wekan {
  6. server wekan-service-dockerbunker:80;
  7. }
  8. server {
  9. listen 80;
  10. server_name ${SERVICE_DOMAIN};
  11. return 301 https://$host$request_uri;
  12. add_header X-Content-Type-Options "nosniff" always;
  13. add_header X-XSS-Protection "1; mode=block" always;
  14. add_header X-Frame-Options "DENY" always;
  15. add_header Referrer-Policy "strict-origin" always;
  16. add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
  17. server_tokens off;
  18. }
  19. server {
  20. listen 443;
  21. server_name ${SERVICE_DOMAIN};
  22. ssl on;
  23. ssl_certificate /etc/nginx/ssl/${SERVICE_DOMAIN}/cert.pem;
  24. ssl_certificate_key /etc/nginx/ssl/${SERVICE_DOMAIN}/key.pem;
  25. include /etc/nginx/includes/ssl.conf;
  26. add_header X-Content-Type-Options "nosniff" always;
  27. add_header X-XSS-Protection "1; mode=block" always;
  28. add_header X-Frame-Options "DENY" always;
  29. add_header Referrer-Policy "strict-origin" always;
  30. add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
  31. server_tokens off;
  32. include /etc/nginx/includes/gzip.conf;
  33. location / {
  34. proxy_pass http://wekan/;
  35. proxy_http_version 1.1;
  36. proxy_set_header Upgrade $http_upgrade; # allow websockets
  37. proxy_set_header Connection $connection_upgrade;
  38. proxy_set_header X-Forwarded-For $remote_addr; # preserve client IP
  39. # this setting allows the browser to cache the application in a way compatible with Meteor
  40. # on every applicaiton update the name of CSS and JS file is different, so they can be cache infinitely (here: 30 days)
  41. # the root path (/) MUST NOT be cached
  42. #if ($uri != '/wekan') {
  43. # expires 30d;
  44. #}
  45. }
  46. location ~ /.well-known {
  47. allow all;
  48. root /var/www/html;
  49. }
  50. }