From 6a7058b30db04cba50e99230601def38ff09cbc8 Mon Sep 17 00:00:00 2001 From: Jack Minardi Date: Wed, 19 Jul 2017 14:42:23 -0400 Subject: [PATCH] Add 301 redirect from port 80 to port 443 --- web/mattermost-ssl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/mattermost-ssl b/web/mattermost-ssl index 9ef7cd0..1ef03b4 100644 --- a/web/mattermost-ssl +++ b/web/mattermost-ssl @@ -1,8 +1,9 @@ -# server { -# listen 80; -# server_name mattermost.example.com; -# return 301 https://$server_name$request_uri; -# } +server { + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + return 301 https://$host$request_uri; +} map $http_x_forwarded_proto $proxy_x_forwarded_proto { default $http_x_forwarded_proto;