# mattermost # config can be tested on https://www.ssllabs.com/ssltest/ and a good nginx config generator # can be found at https://ssl-config.mozilla.org/ # proxy cache proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=mattermost_cache:10m max_size=3g inactive=120m use_temp_path=off; # upstream used in proxy_pass below upstream backend { # ip where Mattermost is running; this relies on a working DNS inside the Docker network # and uses the hostname of the mattermost container (see service name in docker-compose.yml) server mattermost:8065; keepalive 64; } # vhosts definitions server { server_name _; listen 80 default_server; listen [::]:80 default_server; # redirect all HTTP requests to HTTPS with a 301 Moved Permanently response. return 301 https://$host$request_uri; } server { server_name _; listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; # logging access_log /var/log/nginx/mm.access.log; error_log /var/log/nginx/mm.error.log warn; # gzip for performance gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; ## ssl ssl_dhparam /dhparams4096.pem; ssl_session_timeout 1d; ssl_session_cache shared:MozSSL:10m; 1,1 Top