Running gitlab mattemost on apache 24 server with subdirectory (e.g. http://myserver.com/mattermost)
I tried the steps listed here: https://gitlab.com/gitlab-org/gitlab-ce/issues/3156 and it worked fine.
But now I want to run mattermost server on a sub directory like (myserver.com/mattermost) but it fails always. The webpage displays:
Cannot connect to Mattermost We’re having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.
The url directed to (myserver.com/static/main.2b75939e681d6c1cdd03.js)
and here is my .conf file:
SSLEngine on
SSLProxyEngine On
#strong encryption ciphers only
#see ciphers(1) http://www.openssl.org/docs/apps/ciphers.html
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite
"ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS"
Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
SSLCompression Off
SSLCertificateFile client.crt
SSLCertificateKeyFile client.key
SSLCACertificateFile ca.crt
ServerSignature Off
ProxyPreserveHost On
ProxyRequests Off
AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Ssl on
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/api/v1/websocket [NC,OR]
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule ^/mattermost.* ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,NE]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/mattermost.* http://127.0.0.1:8065%{REQUEST_URI} [P,QSA,NE]
<Location /mattermost/api/v1/websocket>
Require all granted
ProxyPassReverse http://127.0.0.1:8065/mattermost/
ProxyPassReverse http://localhost:8801/mattermost/
</Location>
<LocationMatch /mattermost/(.*)>
Require all granted
ProxyPassReverse http://127.0.0.1:8065/mattermost/$1
ProxyPassReverse http://localhsot:8801/mattermost/$1
</LocationMatch>
</VirtualHost>```
I hope there is someone succeeded in configuring mattermost with sub path, or could be this a missing feature then it should be added in future.
Thanks.