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.