2016-12-17 11:10:51 +00:00
|
|
|
#
|
|
|
|
# this is the nginx config for zammad
|
|
|
|
#
|
|
|
|
|
2017-07-23 10:39:57 +00:00
|
|
|
server_tokens off;
|
|
|
|
|
2017-01-12 13:14:25 +00:00
|
|
|
upstream zammad-railsserver {
|
|
|
|
server zammad-railsserver:3000;
|
2016-12-17 11:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
upstream zammad-websocket {
|
2017-01-12 13:14:25 +00:00
|
|
|
server zammad-websocket:6042;
|
2016-12-17 11:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
2017-07-23 10:02:25 +00:00
|
|
|
server_name _;
|
2016-12-17 11:10:51 +00:00
|
|
|
|
|
|
|
root /home/zammad/public;
|
|
|
|
|
|
|
|
client_max_body_size 50M;
|
|
|
|
|
|
|
|
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
|
|
|
expires max;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /ws {
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header CLIENT_IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_read_timeout 86400;
|
|
|
|
proxy_pass http://zammad-websocket;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header CLIENT_IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_read_timeout 180;
|
2017-01-12 13:14:25 +00:00
|
|
|
proxy_pass http://zammad-railsserver;
|
2016-12-17 11:10:51 +00:00
|
|
|
|
|
|
|
gzip on;
|
|
|
|
gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
|
|
|
|
gzip_proxied any;
|
|
|
|
}
|
|
|
|
}
|