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;
|
2021-04-16 06:34:14 +00:00
|
|
|
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
|
|
|
|
2020-02-11 16:10:43 +00:00
|
|
|
# security - prevent information disclosure about server version
|
|
|
|
server_tokens off;
|
|
|
|
|
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;
|
|
|
|
|
2020-10-30 20:52:32 +00:00
|
|
|
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {
|
2016-10-19 20:53:54 +00:00
|
|
|
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;
|
2020-08-26 13:21:17 +00:00
|
|
|
|
|
|
|
# Change this line in an SSO setup
|
|
|
|
proxy_set_header X-Forwarded-User "";
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|