Answer the question
In order to leave comments, you need to log in
nginx+apache+cloudflare proxy pass?
there was a problem with determining ip
there are 2 servers
1) apache + nginx (direct ip without any proxy)
2) apache + nginx (sites behind cloudflare)
on the 1st server there is a counter that looks at the user's IP and writes logs.
on the 2nd set of sites behind cloudflare (loads a .js script from the first server) loads via proxy_pass:
location /file.js {
proxy_pass site.com/file.js;
module mod_realip2 - also installed and configured on both.
set_real_ip_from are also placed (and my second server and cloudflare)
everything seems to work and ip is determined correctly, but it’s worth adding sites (domains) without cloudflare to server 2 (i.e. via dns directly), ip address is written in the logs of a non-user and 2 servers.
I understand I wrote a whole crossword puzzle, but I can’t solve it myself for a week. so I ventured to ask here))
at least approximately where to dig ..
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question