zammad.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # replace 'localhost' with your fqdn if you want to use zammad from remote
  13. server_name localhost;
  14. # security - prevent information disclosure about server version
  15. server_tokens off;
  16. root /opt/zammad/public;
  17. access_log /var/log/nginx/zammad.access.log;
  18. error_log /var/log/nginx/zammad.error.log;
  19. client_max_body_size 50M;
  20. location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
  21. expires max;
  22. }
  23. location /ws {
  24. proxy_http_version 1.1;
  25. proxy_set_header Upgrade $http_upgrade;
  26. proxy_set_header Connection "Upgrade";
  27. proxy_set_header CLIENT_IP $remote_addr;
  28. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  29. proxy_set_header X-Forwarded-Proto $scheme;
  30. proxy_read_timeout 86400;
  31. proxy_pass http://zammad-websocket;
  32. }
  33. location / {
  34. proxy_set_header Host $http_host;
  35. proxy_set_header CLIENT_IP $remote_addr;
  36. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37. proxy_set_header X-Forwarded-Proto $scheme;
  38. proxy_read_timeout 300;
  39. proxy_pass http://zammad-railsserver;
  40. gzip on;
  41. gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  42. gzip_proxied any;
  43. }
  44. }