Sub folder with apache reverse proxy not working

Hi,

I try to serve matomo on such address : localhost:8031/matomo using apache

My httpd.conf file :

ProxyPass /matomo http://localhost:8031/
ProxyPassReverse /matomo http://localhost:8031/
Header Set X-Forwarded-Uri /matomo

My config.ini.php file :

[General]
proxy_uri_header = 1

Result when I go to locahost:8031 is a blank page.
Indeed, it does not request matomo/index.php, but index.php alone.
image

Can you please tell me what I’m missing ?

Hi,

The If Matomo is behind a reverse proxy and installed in a sub-path subsection here should have the solution:
https://matomo.org/faq/how-to-install/faq_98/

Thanks for your answer.
No it does not. I did exactly what is written on that part of the documentation.

I have exactly the same problem. Been working ok for years behind nginx but updated the firewall and proxy (opnsense with nginx) and cannot get matomo to display login page.
How to debug ? Any idea where are the log files ? I do not have anything at piwik/tmp/ logs / matomo .

I think the issue here is http on the backed not https. I dont think

assume_secure_protocol = 1

is working as intended. I have this set but when I connect from local network not via proxy on http I cannot login with this error
Form security failed. Please reload the form and check that your cookies are enabled. If you use a proxy server, you must configure Matomo to accept the proxy header that forwards the Host header. Also, check that your Referrer header is sent correctly.

If I config https on server I can login but on dashboard I get
Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data.

I have not logged in for quite a while due to Covid.

The only workaround I found to “make it work” is manually creating a sub folder “matomo”.
For example : /var/www/html/matomo