zammad.conf 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. location /ws {
  25. proxy_http_version 1.1;
  26. proxy_set_header Upgrade $http_upgrade;
  27. proxy_set_header Connection "Upgrade";
  28. proxy_set_header CLIENT_IP $remote_addr;
  29. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30. proxy_set_header X-Forwarded-Proto $scheme;
  31. proxy_read_timeout 86400;
  32. proxy_pass http://zammad-websocket;
  33. }
  34. location / {
  35. proxy_set_header Host $http_host;
  36. proxy_set_header CLIENT_IP $remote_addr;
  37. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38. proxy_set_header X-Forwarded-Proto $scheme;
  39. # Change this line in an SSO setup
  40. proxy_set_header X-Forwarded-User "";
  41. proxy_read_timeout 300;
  42. proxy_pass http://zammad-railsserver;
  43. gzip on;
  44. gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  45. gzip_proxied any;
  46. }
  47. }