After login it goes to https://www.my_domain.com/ instead of staying in https://www.my_domain.com/piwik/
I discovered this strange behavior.
this is the apache config file
ProxyHTMLEnable on
ProxyHTMLExtended on
ProxyHTMLURLMap http://192.168.1.2:8081 https://www.my_domain.com/piwik
SetOutputFilter proxy-html
RequestHeader unset Accept-Encoding
This is parts of my config.ini.php file
[General]
assume_secure_protocol = 1
force_ssl = 1
trusted_hosts[] = "192.168.1.2:8081"
; Uncomment line below if you use a standard proxy
;proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST
If I go back to the login page, and do a reload, piwik redirects correctly to the application just like I had a successful login. Is my setup wrong, or is this a bug?
Dear courtens,
we are experiencing the same Problem in this setup. Did you find any solution so far? Thanks for any suggestions!
Best
This bug is still active.
Workaround: The only way to log in is to return to the log in page (after log in) to not be redirected to the root folder. I hope this helps.
Here to bug report
Hello losbaeros, sorry for the late answer, but I had no new info on the problem. Now I want to get it working. I have been provided a link to this page, Installation FAQ - Analytics Platform - Matomo which is not really of any help, because this very link is already provided in the error report. The information on that page needs more actual examples. (Like real examples.) I fulled my setup from the production server to a local setup, and I am using fiddler to proxy into apache to recreate the problem. I got is to the point where it is behaving the same way, with the exception that I now can finally “see” part of the “All Websites”. Some images are broken going to the wrong URL. Did you get it to work?
i have the same problem. i am running Matomo 5.2.2 in docker.
docker yml file:
matomo:
image: matomo:latest
restart: always
volumes:
# - ./config:/var/www/html/config:z
# - ./logs:/var/www/html/logs:z
- matomo:/var/www/html:z
environment:
- MATOMO_DATABASE_HOST=mysql
- PHP_MEMORY_LIMIT=1G
env_file:
- ./db.env
ports:
- 8080:80
deploy:
resources:
reservations:
memory: 1.5G
limits:
memory: 2G
config.ini.php
[General]
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"
salt = "bc2962ef4123e9b8cb978d7920cab725"
trusted_hosts[] = "10.151.xx.xx"
enable_form_security = 0
;assume_secure_protocol = 1
proxy_ip_read_last_in_list = 0
nginx.conf
# Proxy for matomo
location /matomo {
proxy_pass http://localhost:8080;
rewrite ^/matomo/(.*)$ /$1 break;
proxy_set_header X-Forwarded-Uri /matomo;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# proxy_redirect / /matomo;
}
if i visit 10.151.xx.xx/matomo/ the login page shows. and when i login, it redirect to / instead of /matomo/
and it is interesting. if i enter /matomo/ after login. then logout. then login. the problem solved. no idea why this happen. please tell me if anyone solve this. thanks