zammad.conf 2.1 KB

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