Mattermost, Inc.

[Solved] Apache Proxy is reloading every page twice

I have Mattermost setup on http port 8065 as well as Apache setup on port 443 with an SSL cert from Let’s Encrypt. Every time I click on a link on the page, such as when switching channels, the page reloads with the light theme (I have the dark theme set in my settings), then reloads again with the dark theme.

Is there any way to stop this?

Also after a while it gives an error at the top “Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.”

In the browser console I’m seeing “Error during WebSocket handshake: Unexpected response code: 500”

In the Apache log I’m getting this, which appears to be the real issue: “No protocol handler was valid for the URL /api/v1/websocket. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.”

What module am I missing? I already have ssl, proxy, and proxy_http.

I fixed the 500 error by enabling proxy_wstunnel.

I fixed the double loading by adding this to my apache config:

RequestHeader unset If-Modified-Since
RequestHeader unset If-None-Match

From here: