Skip to content

Geolocation not working - IPs are not detected. #171

Discussion options

You must be logged in to vote

For those who are still facing the same issue, one way to solve it is by using ngx_http_realip_module which creates a new request that takes the actual user's IP and redirects it to Docker.

in /etc/nginx/nginx.conf add:

        set_real_ip_from 127.0.0.1;
        real_ip_header X-Forwarded-For;
        real_ip_recursive on;

And inside your sites-enabled file, for example /etc/nginx/sites-enabled/myshortwebsite.com

server {
  listen 80;
  server_name myshortwebsite.com;

  location / {
    proxy_pass http://localhost:8080;
    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-Fo…

Replies: 0 comments 14 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@acelaya
Comment options

@monarchmaisuriya
Comment options

@AbdelrahmanHafez
Comment options

@AbdelrahmanHafez
Comment options

Answer selected by acelaya
Comment options

You must be logged in to vote
1 reply
@acelaya
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Shlink Discussions related with https://github.com/shlinkio/shlink
4 participants