Hi,
With v1 it works right out the box. My nginx config is as follows:
upstream mattermost_proxy {
server 192.168.10.10:8065;
}
server {
listen 443;
server_name chat.example.com;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/commercial.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://mattermost_proxy;
}
location /api/v1/websocket {
proxy_pass http://mattermost_proxy;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
client_max_body_size 4G;
keepalive_timeout 10;
}
Websocket requires the special config as documented here: https://www.nginx.com/blog/websocket-nginx/