4.4.1 reverse proxy, links to Websites on dashboard don't work properly

I’m trying to run matomo behind a reverse proxy (in a docker-compose’d environment)
This is my nginx config:

    location /matomo/ {
        resolver 127.0.0.11 valid=30s;
        set $upstream http://matomo:8100;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Referer $http_referer;
        proxy_buffering off;

        proxy_pass $upstream;

        rewrite ^/matomo/(.*)$ /$1 break;
    }

This works a bit, but not correctly everywhere, for example the links on the “All Websites Dashboard” are wrong. Most other links seems fine. (but not the link to the logo in the upper left corner)

Hi,

The last section here might help:
https://matomo.org/faq/how-to-install/faq_98/

Thank you Lukas for the quick reply. I already have next lines in my configuration (else even the login-page won’t work).

[General]
proxy_uri_header = 1
enable_trusted_host_check = 0

Did you mean this? Or something else?

Good point that otherwise it wouldn’t work at all.
I can’t test this at the moment, but I agree that this might be a bug.

Ok. I raised a bug on the github project. Is that the correct place?

1 Like

@Rob_Audenaerde Don’t hesitate to put a link to the gitHub issue in this topic…
MultiSites reverse proxy on subdir/path is broken · Issue #17945 · matomo-org/matomo (github.com)