@courtens opened this Issue on October 18th 2018

I reported this problem some time ago in the forum under "Bug? Proxy redirect to root after login success - instead of staying within assigned sub-folder". If I remember right the problem started about 3 years ago with one of the mayor updates.

The problem is that I can not host the code from within a sub-folder of a website without some functions not working. Some of the problems: 1) During login I get redirected to the root folder. 2) "All Websites" index.php?module=MultiSites&action=index&idSite=1&period=range&date=previous30 produces a page with no record content showing.

@micw commented on November 20th 2018

If you run it behind a proxy, you can configure it this way: https://matomo.org/faq/how-to-install/faq_98/
But IMO this should be an application setting and should not rely on special proxy settings.

@heikojansen commented on September 13th 2019

I don't know if 1) is related to the MultiSites plugin but 2) certainly is:

I see data in the "All Websites" page but the sparkline graphics do not show up.
I think this is because here:
https://github.com/matomo-org/matomo/blob/19377972454bfe3c4cdc7778e144cb6107b4af44/plugins/MultiSites/angularjs/site/site.controller.js#L44
the URL used for the sparkline generation is absolute in relation to the installation and thus not working when used behind a reverse proxy and in a different subdirectory.

This can be fixed by simply removing the "piwik.piwik_url" part from the returned URL.

Just make sure to run "php ./console cache:clear" to see any effect.

@chrisv-dev commented on June 9th 2020

@micw Are you talking about adding the X-Forwarded-Uri Header for the proxying webserver and setting the proxy_uri_header = 1 inside config/config.ini.php ? I tried that but I still get 302 redirects to / after login.

If you run it behind a proxy, you can configure it this way: https://matomo.org/faq/how-to-install/faq_98/
But IMO this should be an application setting and should not rely on special proxy settings.

@micw commented on June 9th 2020

Can't remember (was 1,5 years ago) and I don't use it anymore.

Powered by GitHub Issue Mirror