2016-10-19 20:53:54 +00:00
|
|
|
#
|
|
|
|
# this is the nginx config for zammad
|
|
|
|
#
|
|
|
|
|
2017-12-03 13:33:31 +00:00
|
|
|
upstream zammad-railsserver {
|
2018-11-21 16:50:05 +00:00
|
|
|
server 127.0.0.1:3000;
|
2016-10-19 20:53:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
upstream zammad-websocket {
|
2018-11-21 16:50:05 +00:00
|
|
|
server 127.0.0.1:6042;
|
2016-10-19 20:53:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
2016-11-12 15:18:24 +00:00
|
|
|
|
2016-11-12 15:20:09 +00:00
|
|
|
# replace 'localhost' with your fqdn if you want to use zammad from remote
|
2016-10-26 09:04:36 +00:00
|
|
|
server_name localhost;
|
2016-11-12 15:18:24 +00:00
|
|
|
|
2016-10-19 20:53:54 +00:00
|
|
|
root /opt/zammad/public;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/zammad.access.log;
|
|
|
|
error_log /var/log/nginx/zammad.error.log;
|
|
|
|
|
|
|
|
client_max_body_size 50M;
|
|
|
|
|
|
|
|
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
|
|
|
expires max;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /ws {
|
2016-11-12 15:18:24 +00:00
|
|
|
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;
|
2017-07-12 09:27:33 +00:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
2016-11-12 15:18:24 +00:00
|
|
|
proxy_read_timeout 86400;
|
2016-10-19 20:53:54 +00:00
|
|
|
proxy_pass http://zammad-websocket;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
2016-11-12 15:18:24 +00:00
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header CLIENT_IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2017-07-12 09:27:33 +00:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
2017-09-26 06:52:22 +00:00
|
|
|
proxy_read_timeout 300;
|
2017-12-03 13:33:31 +00:00
|
|
|
proxy_pass http://zammad-railsserver;
|
2016-10-19 20:53:54 +00:00
|
|
|
|
2016-11-12 15:18:24 +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;
|
2016-10-19 20:53:54 +00:00
|
|
|
}
|
|
|
|
}
|