If you may get an error 'conn_rec' has no member named 'remote_ip' while installing mod_evasive module on apache web server,

# apxs -i -a -c mod_evasive20.c

mod_evasive20.c: In function 'access_checker':
mod_evasive20.c:142:39: error: 'conn_rec' has no member named 'remote_ip'
       if (is_whitelisted(r->connection->remote_ip)) 
                                       ^
mod_evasive20.c:146:43: error: 'conn_rec' has no member named 'remote_ip'
       n = ntt_find(hit_list, r->connection->remote_ip);
                                           ^
mod_evasive20.c:158:56: error: 'conn_rec' has no member named 'remote_ip'
         snprintf(hash_key, 2048, "%s_%s", r->connection->remote_ip, r->uri);
                                                        ^
mod_evasive20.c:165:47: error: 'conn_rec' has no member named 'remote_ip'
             ntt_insert(hit_list, r->connection->remote_ip, time(NULL));
                                               ^
mod_evasive20.c:180:58: error: 'conn_rec' has no member named 'remote_ip'
         snprintf(hash_key, 2048, "%s_SITE", r->connection->remote_ip);
                                                          ^
mod_evasive20.c:187:47: error: 'conn_rec' has no member named 'remote_ip'
             ntt_insert(hit_list, r->connection->remote_ip, time(NULL));
                                               ^
mod_evasive20.c:208:117: error: 'conn_rec' has no member named 'remote_ip'
         snprintf(filename, sizeof(filename), "%s/dos-%s", log_dir != NULL ? log_dir : DEFAULT_LOG_DIR, r->connection->remote_ip);
                                                                                                                     ^
mod_evasive20.c:212:13: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]
             fprintf(file, "%ld\n", getpid());
             ^
mod_evasive20.c:212:13: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
mod_evasive20.c:215:90: error: 'conn_rec' has no member named 'remote_ip'
             LOG(LOG_ALERT, "Blacklisting address %s: possible DoS attack.", r->connection->remote_ip);
                                                                                          ^
mod_evasive20.c:46:82: note: in definition of macro 'LOG'
 #define  LOG( A, ... ) { openlog("mod_evasive", LOG_PID, LOG_DAEMON); syslog( A, __VA_ARGS__ ); closelog(); }
                                                                                  ^
mod_evasive20.c:221:78: error: 'conn_rec' has no member named 'remote_ip'
                 fprintf(file, "Subject: HTTP BLACKLIST %s\n\n", r->connection->remote_ip);
                                                                              ^
mod_evasive20.c:222:81: error: 'conn_rec' has no member named 'remote_ip'
                 fprintf(file, "mod_evasive HTTP Blacklisted %s\n", r->connection->remote_ip);
                                                                                 ^
mod_evasive20.c:228:81: error: 'conn_rec' has no member named 'remote_ip'
               snprintf(filename, sizeof(filename), system_command, r->connection->remote_ip);


As remote_ip has been changed to client_ip, run the following command to install again,
 
# cp mod_evasive{20,24}.c

# ls
CHANGELOG  LICENSE  Makefile.tmpl  mod_evasive20.c  mod_evasive24.c  mod_evasive.c  mod_evasiveNSAPI.c  README  test.pl
#  sed s/remote_ip/client_ip/g  -i  mod_evasive24.c

Now, execute the copied the file,
 
#  apxs -i -a -c mod_evasive24.c

----------------------------------------------------------------------
chmod 755 /usr/lib64/httpd/modules/mod_evasive24.so
[activating module `evasive20' in /etc/httpd/conf/httpd.conf]

LoadModule evasive20_module   /usr/lib64/httpd/modules/mod_evasive24.so
# httpd -M | grep evasive20_module
 evasive20_module (shared)