If I enter all the URL address (http://mysite.com:8065) of my Mattermost site directly, I can use Mattermost normally. I want to make HTTPS connection but I can not use it.
First of all, I ignored Mattermost and confirmed the HTTPS connection at index.html on the site. Neither problem.
http://mysite.com/index.html -> OK
https://mysite.com/index.html -> OK
*Of course, redirect from http to https is also OK.
Next using Mattermost. Direct input URL.
https://mysite.com:8065
Firefox:
An error occurred while connecting to mysite.com:8065. SSL received a record that exceeded the maximum permissible length. error code: SSL_ERROR_RX_RECORD_TOO_LONG
Because we could not verify the authenticity of the received data, we could not display this page.
Please contact the website administrator for this issue.
Chrome:
ERR_SSL_PROTOCOL_ERROR
Next I set proxy_pass at the location of nginx.
location {
...
proxy_pass http://localhost:8065;
}
In this case, it falls into a (redirect) loop.
location {
...
proxy_pass https://localhost:8065;
}
In this case, the above SSL error.
I run ‘sudo -u mattermost /opt/mattermost/bin/mattermost’ and it seems that no errors are displayed even if I look at the situation.
my config.json:
“ServiceSettings”: {
“SiteURL”: “http://mysite:com”,
“WebsocketURL”: “”,
“LicenseFileLocation”: “”,
“ListenAddress”: “:8065”,
“ConnectionSecurity”: “”,
“TLSCertFile”: “”,
“TLSKeyFile”: “”,
“UseLetsEncrypt”: false,
“LetsEncryptCertificateCacheFile”: “./config/letsencrypt.cache”,
“Forward80To443”: false,
“ReadTimeout”: 300,
“WriteTimeout”: 300,
“MaximumLoginAttempts”: 10,
“GoroutineHealthThreshold”: -1,
“GoogleDeveloperKey”: “”,
“EnableOAuthServiceProvider”: false,
“EnableIncomingWebhooks”: true,
“EnableOutgoingWebhooks”: true,
“EnableCommands”: true,
“EnableOnlyAdminIntegrations”: true,
“EnablePostUsernameOverride”: false,
“EnablePostIconOverride”: false,
“EnableLinkPreviews”: false,
“EnableTesting”: false,
“EnableDeveloper”: false,
“EnableSecurityFixAlert”: true,
“EnableInsecureOutgoingConnections”: false,
“AllowedUntrustedInternalConnections”: “”,
“EnableMultifactorAuthentication”: false,
“EnforceMultifactorAuthentication”: false,
“EnableUserAccessTokens”: false,
“AllowCorsFrom”: “”,
“AllowCookiesForSubdomains”: false,
“SessionLengthWebInDays”: 30,
“SessionLengthMobileInDays”: 30,
“SessionLengthSSOInDays”: 30,
“SessionCacheInMinutes”: 10,
“SessionIdleTimeoutInMinutes”: 0,
“WebsocketSecurePort”: 443,
“WebsocketPort”: 80,
“WebserverMode”: “gzip”,
“EnableCustomEmoji”: false,
“EnableEmojiPicker”: true,
“EnableGifPicker”: false,
“GfycatApiKey”: “2_KtH_W5”,
“GfycatApiSecret”: “3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof”,
“RestrictCustomEmojiCreation”: “all”,
“RestrictPostDelete”: “all”,
“AllowEditPost”: “always”,
“PostEditTimeLimit”: -1,
“TimeBetweenUserTypingUpdatesMilliseconds”: 5000,
“EnablePostSearch”: true,
“EnableUserTypingMessages”: true,
“EnableChannelViewedMessages”: true,
“EnableUserStatuses”: true,
“ExperimentalEnableAuthenticationTransfer”: true,
“ClusterLogTimeoutMilliseconds”: 2000,
“CloseUnusedDirectMessages”: false,
“EnablePreviewFeatures”: true,
“EnableTutorial”: true,
“ExperimentalEnableDefaultChannelLeaveJoinMessages”: true,
“ExperimentalGroupUnreadChannels”: “disabled”,
“ImageProxyType”: “”,
“ImageProxyURL”: “”,
“ImageProxyOptions”: “”,
“EnableAPITeamDeletion”: false,
“ExperimentalEnableHardenedMode”: false,
“ExperimentalLimitClientConfig”: false,
“EnableEmailInvitations”: true }
I want to connect HTTPS by direct input at least. Please tell me how to make HTTPS connection with Mattermost.
Please help.
Mattermost: 5.1.0 / CentOS 7.5 / Nginx: 1.13.8 / PHP 7.1.20 / MariaDB 10.3.8