I have installed matomo 5.3 in kubernetes using nginx as ingress controller. But all visitors and login trys are shown as the private IP of the classic load balancer, I followed matomo documentation matomo org/faq/how-to-install/faq_98/, but the configuration still doens’t work, and I couldn’t solve it with AI. Here the extra configuration I did:
ConfigMap of ingress nginx controller:
real-ip-header: X-Forwarded-For
set-real-ip-from: 0.0.0.0/0
use-forwarded-headers: “true”
proxy-real-ip-cidr: 17x.x.0.0/x
Ingress of matomo:
kubernetes io/ingress.class: nginx
nginx ingress kubernetes io/real-ip-header: X-Forwarded-For
nginx ingress kubernetes io/rewrite-target: /
nginx ingress.kubernetes io/set-real-ip-from: 0.0.0.0/0
nginx ingressn kubernetes io/use-forwarded-headers: “true”
Matomo config.ini.php
[General]
assume_secure_protocol = 1
force_ssl = 1
proxy_host_headers = HTTP_X_FORWARDED_HOST
proxy_client_headers = HTTP_X_FORWARDED_FOR
salt = “mysalt”
trusted_hosts = “myhost com”
proxy_ip_read_last_in_list = 1
trusted_proxies = “17x.x.0.0/x”
proxy_ips = 17x.x.0.0/x
In headers response I get the private IP as the only IP in the request, maybe I’m debuggin in a wrong way.
Could someone help me debug the cause or solve this issue?
Thank’s a lot,
Gabriel