Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. #
  2. # this is the nginx config for zammad
  3. # link this file in your /etc/nginx/sites-enabled via symlink
  4. # (ln -s /opt/zammad/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf)
  5. #
  6.  
  7. upstream zammad {
  8. server localhost:3000;
  9. }
  10.  
  11. upstream zammad-websocket {
  12. server localhost:6042;
  13. }
  14.  
  15. server {
  16. listen 80;
  17. server_name zammad.example.com;
  18. root /opt/zammad/public;
  19.  
  20. access_log /var/log/nginx/zammad.access.log;
  21. error_log /var/log/nginx/zammad.error.log;
  22.  
  23. client_max_body_size 50M;
  24.  
  25. location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
  26. expires max;
  27. }
  28.  
  29. location /ws {
  30. proxy_http_version 1.1;
  31. proxy_set_header Upgrade $http_upgrade;
  32. proxy_set_header Connection "Upgrade";
  33. proxy_set_header CLIENT_IP $remote_addr;
  34. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35. proxy_read_timeout 86400;
  36. proxy_pass http://zammad-websocket;
  37. }
  38.  
  39. location / {
  40. proxy_set_header Host $http_host;
  41. proxy_set_header CLIENT_IP $remote_addr;
  42. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  43. proxy_pass http://zammad;
  44.  
  45. gzip on;
  46. gzip_types text/html text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
  47. gzip_proxied any;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement