zammad.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # this is the nginx config for zammad
  3. #
  4. upstream zammad {
  5. server localhost:3000;
  6. }
  7. upstream zammad-websocket {
  8. server localhost: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. root /opt/zammad/public;
  15. access_log /var/log/nginx/zammad.access.log;
  16. error_log /var/log/nginx/zammad.error.log;
  17. client_max_body_size 50M;
  18. location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
  19. expires max;
  20. }
  21. location /ws {
  22. proxy_http_version 1.1;
  23. proxy_set_header Upgrade $http_upgrade;
  24. proxy_set_header Connection "Upgrade";
  25. proxy_set_header CLIENT_IP $remote_addr;
  26. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  27. proxy_read_timeout 86400;
  28. proxy_pass http://zammad-websocket;
  29. }
  30. location / {
  31. proxy_set_header Host $http_host;
  32. proxy_set_header CLIENT_IP $remote_addr;
  33. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  34. proxy_read_timeout 180;
  35. proxy_pass http://zammad;
  36. gzip on;
  37. gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  38. gzip_proxied any;
  39. }
  40. }