by
0
4
4,833
34
Top 1% !
Popular
Famous
Specified
Popularity: 1657th place
Created
Modified Dec 16, 2015

Published on:

No tags for this snippet yet.
LanguageApache
SourceGitHub

Mattermost Apache config example

Mattermost Apache config example: 
mattermost.conf
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/874610/Mattermost-Apache-config-example?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<VirtualHost *:80> ServerName mattermost.example.org ServerAdmin webmaster@example.org ErrorLog ${APACHE_LOG_DIR}/mattermost-error.log CustomLog ${APACHE_LOG_DIR}/mattermost-access.log combined # Enforce HTTPS: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] </VirtualHost> <VirtualHost *:443> SSLEngine on ServerName mattermost.example.org ServerAdmin webmaster@example.org ErrorLog ${APACHE_LOG_DIR}/mattermost-error.log CustomLog ${APACHE_LOG_DIR}mattermost-access.log combined RewriteEngine On RewriteCond %{REQUEST_URI} ^/api/v1/websocket [NC,OR] RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR] RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] RewriteRule .* ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule .* http://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L] RequestHeader set X-Forwarded-Proto "https" <Location /api/v1/websocket> Require all granted ProxyPassReverse ws://127.0.0.1:8065/api/v1/websocket ProxyPassReverseCookieDomain 127.0.0.1 mattermost.example.org </Location> <Location /> Require all granted ProxyPassReverse http://127.0.0.1:8065/ ProxyPassReverseCookieDomain 127.0.0.1 mattermost.example.org </Location> ProxyPreserveHost On ProxyRequests Off </VirtualHost>
If you want to be updated about similar snippets, Sign in and follow our Channels