zammad.conf 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. # this is an example nginx config for Zammad
  3. # Please visit https://docs.zammad.org for further input on how to configure
  4. # your nginx to work with Zammad
  5. #
  6. # This is a NON SSL configuration, DO NOT use in production!
  7. #
  8. upstream zammad-railsserver {
  9. server 127.0.0.1:3000;
  10. }
  11. upstream zammad-websocket {
  12. server 127.0.0.1:6042;
  13. }
  14. server {
  15. listen 80;
  16. listen [::]:80;
  17. # replace 'localhost' with your fqdn if you want to use zammad from remote
  18. server_name localhost;
  19. # security - prevent information disclosure about server version
  20. server_tokens off;
  21. root /opt/zammad/public;
  22. access_log /var/log/nginx/zammad.access.log;
  23. error_log /var/log/nginx/zammad.error.log;
  24. client_max_body_size 50M;
  25. location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {
  26. expires max;
  27. }
  28. # legacy web socket server
  29. location /ws {
  30. proxy_http_version 1.1;
  31. proxy_set_header Upgrade $http_upgrade;
  32. proxy_set_header Connection "Upgrade";
  33. proxy_set_header Host $http_host;
  34. proxy_set_header CLIENT_IP $remote_addr;
  35. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36. proxy_set_header X-Forwarded-Proto $scheme;
  37. proxy_read_timeout 86400;
  38. proxy_pass http://zammad-websocket;
  39. }
  40. # action cable
  41. location /cable {
  42. proxy_http_version 1.1;
  43. proxy_set_header Upgrade $http_upgrade;
  44. proxy_set_header Connection "Upgrade";
  45. proxy_set_header Host $http_host;
  46. proxy_set_header CLIENT_IP $remote_addr;
  47. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  48. proxy_set_header X-Forwarded-Proto $scheme;
  49. proxy_read_timeout 86400;
  50. proxy_pass http://zammad-railsserver;
  51. }
  52. location / {
  53. proxy_set_header Host $http_host;
  54. proxy_set_header CLIENT_IP $remote_addr;
  55. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  56. proxy_set_header X-Forwarded-Proto $scheme;
  57. # Change this line in an SSO setup
  58. proxy_set_header X-Forwarded-User "";
  59. proxy_read_timeout 300;
  60. proxy_pass http://zammad-railsserver;
  61. gzip on;
  62. gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  63. gzip_proxied any;
  64. }
  65. }