mod_cloudflare is nor working with nginx

nicsopon

Verified User
Joined
Jul 4, 2006
Messages
101
Hi

I'm using cloudflare dns for a lot of domains. I try mod_cloudflare to get a real visitor IPs in the log file and found that it's not working with nginx_apache.

So, I have to switch to 'apache' and it works properly.

Just for your information to take a look at nginx to work with mod_cloudflare.

If you can advice how to manually modify will be very appreciated.

Thanks & Best Regards
 
Hello,

You don't need mod_cloudflare for nginx. It's realip module for nginx: http://nginx.org/en/docs/http/ngx_http_realip_module.html to be used instead.
 
Hi

I rebuild as your adviced with a custom/nginx/configuration.nginx and disable mod_cloudflare but it doesn't work.

Cloudflare send a reall visitor ip in a variable in header : "CF-Connecting-IP: A.B.C.D". Anyway, I don't konw where to put this variable to in DA configuration.

Thanks & Best Regards
 
Hi

nano /etc/httpd/conf/httpd.conf -> add "# " to line "Load module moe_clouudflare.."
cd /usr/local/directadmin/custombuild
mkdir custom/nginx
cp configure/nginx/configure.nginx custom/nginx/
nano custom/nginx/configure.nginx -> add to the end of file -> "\ --with-http_realip_module"
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs

After that I add mod_rpasf from this thread: http://forum.directadmin.com/showthread.php?t=49438&highlight=mod_rpaf

Please advice.

Thanks & Best Regards
 
When you install nginx+apache, you don't need mod_rpaf at all.
To instruct nginx on how to detect realip put your instructions into /etc/nginx/nginx-includes.conf and restart nginx.
 
Please inform what we have to put the instructions into ->

/etc/nginx/nginx-includes.conf

Thanks
 
Back
Top