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)