0

I have a self-hosted GitLab instance behind an Apache reverse proxy. Since one of the last releases, real-time updates stopped working. One symptom I could detect was that some websocket calls (to wss://gitlab.example.com/-/cable) seem to fail with a 404:

Firefox dev console screenshot of the failing requests

This looks like a possible Apache config problem, so how can I configure my Apache reverse proxy to allow these connections? The relevant part of my current setting looks like this:

ProxyRequests     off
ProxyPreserveHost on

ProxyPass        / https://0.0.0.0:4000/
ProxyPassReverse / https://0.0.0.0:4000/

1 Answer 1

0

What did the trick was to add a special rule for the websocket ressource, before the general proxy setting:

ProxyRequests     off
ProxyPreserveHost on

# The first matching rule wins
ProxyPass        /-/cable wss://0.0.0.0:4000/-/cable
ProxyPassReverse /-/cable wss://0.0.0.0:4000/-/cable

ProxyPass        / https://0.0.0.0:4000/
ProxyPassReverse / https://0.0.0.0:4000/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .