wekan.conf 1.8 KB

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