I have configured varnish + apache + cloudflare. I have configured website to get the IP location and serve the location based website.
e.g. If the apache get the IP from UK the UK website will open on client system.
I have set up the varnish to forward IP in default.vcl as below.
sub vcl_recv {
# Happens before we check if we have this in cache already.
#
# Typically you clean up the request here, removing cookies you don't need,
# rewriting the request, etc.
if (req.http.cf-connecting-ip) {
# set req.http.X-Forwarded-For = req.http.cf-connecting-ip;
# } else {
set req.http.X-Forwarded-For = client.ip;
}
It would be better for me If anyone can help to solve this.
--
Thanks & Regards,
Mrugesh C Shah