This module is already enabled by default in cPnginx version 6.0 or higher . You may simply need to add the module setting in nginx.conf as follows,
set_real_ip_from $firewall_ip1;
set_real_ip_from $firewall_ip2;
real_ip_header X-Real-IP;
You may also edit /usr/local/apache/conf/mod_rpaf.conf with the following
RPAFheader X-Real-IP
RPAFheader X-Forwarded-For
These sttings are required for cloudflare clients.