zammad.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # this is the nginx config for zammad
  3. # link this file in your sites-enabled via symlink (ln -s nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf)
  4. #
  5. server {
  6. listen 80;
  7. server_name your.domain.org;
  8. root /opt/zammad/public;
  9. access_log /var/log/nginx/zammad.access.log;
  10. error_log /var/log/nginx/zammad.error.log;
  11. client_max_body_size 50M;
  12. location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
  13. expires max;
  14. }
  15. # proxy all to app server
  16. location / {
  17. proxy_set_header Host $http_host;
  18. proxy_set_header CLIENT_IP $remote_addr;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. proxy_pass http://localhost:3000;
  21. gzip on;
  22. gzip_types text/html text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  23. gzip_proxied any;
  24. }
  25. # proxy web sockets to app server
  26. location /ws {
  27. proxy_http_version 1.1;
  28. proxy_set_header Upgrade $http_upgrade;
  29. proxy_set_header Connection "Upgrade";
  30. proxy_set_header CLIENT_IP $remote_addr;
  31. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  32. proxy_read_timeout 86400;
  33. proxy_pass http://localhost:6042;
  34. }
  35. }