I
I
iandriyanov2012-07-31 13:11:10
Nginx
iandriyanov, 2012-07-31 13:11:10

How to change local ip to global?

For testing geo targeting, installed mod_rpaf on apache and real_ip on nginx.
In the headers, I get the local ip, which is logical. Is it possible to somehow replace it with a real one to determine the geo, thereby making sure that the script works out. And it's not even about working out. And is it possible to change hands?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2012-07-31
@iandriyanov


It is necessary to register proxy_set_header X-Real-IP xxxx in the nginx config ;
or
proxy_set_header X-Forwarded-For xxxx;
Then Apache will receive the address xxxx

P
paralon, 2012-07-31
@paralon

If all your testing takes place on the local network, then you can use any IP addresses you want on your hosts.
If I understand the question correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question