New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiSites reverse proxy on subdir/path is broken #17945
Comments
Something similar was also reported in #13627 |
I'm using Matomo within Docker. I can confirm this bug. I've the exact same behavior. My nginx reverse proxy conf:
config.ini.php
Any solution so far? |
This issue occurs when the reverse proxy is setup with a directory that points at a Matomo instance, but the Matomo instance isnt actually installed in that directory. For example if the proxy Matomo url is If Matomo is installed in the same directory path ( In SettingsPiwik.php:198-201 there is a check that if the The Disabling the check on lines SettingsPiwik:198-210 works around the problem and the piwikUrl is not overwritten. We could add a new config.ini.php option @tsteur Does this sound like an acceptable solution? |
@bx80 I haven't tested but was hoping it might fix it by simply removing Seems we usually don't use this and instead simply use relative links maybe |
@tsteur Thanks, that worked on my docker / reverse proxy test setup, at least for some of the broken links (choose site and the sparkline), there might be a few other places that need adjusting too (add new website, etc). I'll create a PR to replace any piwik_url usage in the multisites plugin with relative paths. |
There is actually an existing config setting available in current releases which resolves this problem. Adding |
Has this been fixed in 4.7.1? But not all the urls are correct yet. The logo image for example still points to That means the logo still won't show (same as in the screenshots above). So I guess this has only been fixed partially... Can anyone confirm this? Thanks for your work! |
Hi @54mu3l, thanks for following this up. I've tested this with 4.7.1 and the logo paths should be correct as long as the Could you try adding |
Hi @bx80, thanks for the hint. Now it seems to work! |
I'm trying to run Matomo behing a reverse proxy. I followed the https://matomo.org/faq/how-to-install/faq_98/ , but there are still some issues left. For example, the MultiSites plugin/All websites page links are broken.
Expected Behavior
I expect the links to the websites to work. They don't. When I pick the website from the dropdown in the CoreHome, it work flawlessly.
Current Behavior
Incorrect in MultiSites:
Correct in CoreHome:
Possible Solution
Fix the urls in the MultiSites, so that they are either relative, or correctly absolute.
Steps to Reproduce (for Bugs)
Your Environment
nginx reverse proxy conf:
The text was updated successfully, but these errors were encountered: