we have discussed about implementing subpath support for MM to allow it to work with apache and proxypass.
It seems to me that the implementation deployed with v5.1 doesn’t do the job.
I see that the port assign to the server affects he site url. and I didnt find a documentation how to set it up.
Can we have a second look at it.
even without the subpath Mattermost has worked with Apache just fine (I guess once you reach a certain amount of users you will memory wise be happier with nginx or something even lighter).
After the 5.1 release I made a few tests with the Univention app I’m maintaining and it’s default apache configuration (you can find the template at https://stash.z-hub.io/projects/K4U/repos/mattermost/browse/configure_host#94-171, the stuff that proxies to 8778 you can ignore, that is our Web Meetings server). There it worked out of the box. This in the other hand means to proxy /mattermost, you still need to proxy /api as well.
“Yes, that vhost was primarily designed to be run as a subdomain, but it works just as well when the mattermost ui is running from a subpath.”
no it doesn’t. it requires a very different setup.
“I already told you above that you need to add a proxy for /api ontop of your /mattermost proxy.”
I have proxy sockets setup for http and ws but it doesn’t work. I think it’s something related to websockets and webapis conflicting to each other. I’m still looking into it.
[Client] - SSL - [Apache] - port 8065 - [Mattermost]
Good news is I got HTTP to work now I want HTTPS to work as well.
Notice that Apache is handling SSL, not mattermost.
but it fails with websocket incorrect http response code 400 bad request.
{“level”:“error”,“ts”:1532105907.0583162,“caller”:“api4/websocket.go:28”,“msg”:“websocket connect err: websocket: the client is not using the websocket protocol: ‘upgrade’ token not found in ‘Connection’ header”}
{“level”:“error”,“ts”:1532105907.0584223,“caller”:“web/handlers.go:142”,“msg”:“Failed to upgrade websocket connection”,“path”:"/mattermost/api/v4/websocket",“request_id”:“75mwaqp5mtr79cbiycamf896ec”,“ip_addr”:“XX.XX.XX.XX”,“user_id”:“ia9bwacoqpgaxyk8qyp7d1ox5y”,“method”:“GET”,“err_where”:“connect”,“http_code”:500,“err_details”:""}
{“level”:“info”,“ts”:1532105907.0584779,“caller”:“web/handlers.go:163”,“msg”:“http: multiple response.WriteHeader calls”,“source”:“httpserver”}
I had a quick look to those pages and they seem quite shallow.
I think you should have a guide with steps how to setup these important processes.
Understood. It doesn’t sound like subpaths are (yet) an issue here, but a problem with our documentation re: Apache2 and SSL.
One thing that seems odd in the documentation is that the <VirtualHost *:80> section has wss:// in the RewriteRule, but the <VirtualHost *:443> section has a ws://. This seems backwards, since wss is the analogue to https.
Can you try updating your RewriteRule in the SSL configuration to use wss instead?