2023-06-07 23:17:12 +02:00
|
|
|
### {{ ansible_managed }}
|
|
|
|
|
|
|
|
upstream zammad-railsserver {
|
|
|
|
server 127.0.0.1:3000;
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream zammad-websocket {
|
|
|
|
server 127.0.0.1:6042;
|
|
|
|
}
|
|
|
|
|
2021-07-28 18:28:22 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name {{ zammad_domain }};
|
|
|
|
|
|
|
|
root {{ zammad_home }}/public;
|
|
|
|
error_log /var/log/nginx/{{ zammad_domain }}.error.log;
|
|
|
|
|
|
|
|
client_max_body_size 50M;
|
|
|
|
|
|
|
|
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {
|
|
|
|
expires max;
|
|
|
|
}
|
|
|
|
|
2023-06-07 23:17:12 +02:00
|
|
|
location /cable {
|
|
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_read_timeout 86400;
|
|
|
|
proxy_pass http://zammad-railsserver;
|
|
|
|
}
|
|
|
|
|
2021-07-28 18:28:22 +02:00
|
|
|
location /ws {
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
2021-07-29 20:26:37 +02:00
|
|
|
proxy_set_header CLIENT_IP $proxy_add_x_forwarded_for;
|
2021-07-28 18:28:22 +02:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_read_timeout 86400;
|
2023-06-07 23:17:12 +02:00
|
|
|
proxy_pass http://zammad-websocket;
|
2021-07-28 18:28:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header Host $http_host;
|
2021-07-29 20:26:37 +02:00
|
|
|
proxy_set_header CLIENT_IP $proxy_add_x_forwarded_for;
|
2021-07-28 18:28:22 +02:00
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
# Change this line in an SSO setup
|
|
|
|
proxy_set_header X-Forwarded-User "";
|
|
|
|
proxy_read_timeout 300;
|
2023-06-07 23:17:12 +02:00
|
|
|
proxy_pass http://zammad-railsserver;
|
2021-07-28 18:28:22 +02:00
|
|
|
}
|
|
|
|
}
|