Matomo geolocation does not work (it used the private internal IP-Address) on nginx | what I make false?


#1

Matomo uses the internal private IP address instead of the external address in nginx. What I make false.

I already tried the following in my nginx configuration (change the proxy header) but without success:

  1. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  2. proxy_set_header X-Forwarded-For $remote_addr;

I use nginx 1.14.2 with the latest Matomo version. I’m glad to hear their solutions for my problem.

Greetings,
Sven


(Lukas Winkler) #2

Hi,

Have you also followed these instructions?
https://matomo.org/faq/how-to-install/faq_98/


#3

@Lukas Thank you for your help. I have tried to set the following:

proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST

and I have also tried:

proxy_client_headers[] = X-REAL-IP
proxy_host_headers[] = X-HOST

But I have not found a working solution (get the IP address from my nginx server). I hope you still have a solution or someone else.

Greetings,
Sven