zammad.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # this is the nginx config for zammad
  3. #
  4. upstream zammad-railsserver {
  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_set_header X-Forwarded-Proto $scheme;
  28. proxy_read_timeout 86400;
  29. proxy_pass http://zammad-websocket;
  30. }
  31. location / {
  32. proxy_set_header Host $http_host;
  33. proxy_set_header CLIENT_IP $remote_addr;
  34. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35. proxy_set_header X-Forwarded-Proto $scheme;
  36. proxy_read_timeout 300;
  37. proxy_pass http://zammad-railsserver;
  38. gzip on;
  39. gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  40. gzip_proxied any;
  41. }
  42. }