%PDF- %PDF-
Direktori : /usr/local/src/publicnginx/ |
Current File : //usr/local/src/publicnginx/installmodrpaf |
#!/bin/bash # Nginx Admin Installer # Website: www.nginxcp.com # # Copyright (C) NGINXCP.COM. # cd /usr/local/src wget -c http://nginxcp.com/latest/nginxadmin.tar tar -xf nginxadmin.tar cd /usr/local/src/publicnginx/mod_rpaf-0.6 #cd mod_rpaf-0.6/ /usr/local/apache/bin/apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c /usr/local/cpanel/bin/apache_conf_distiller --update /scripts/rebuildhttpdconf if grep "rpaf.conf" /usr/local/apache/conf/httpd.conf ; then /scripts/rebuildippool > /dev/null 2>&1 LIST=$(/scripts/ipusage | awk '{print $1}'|while read ip; do echo -ne "${ip} "; done) cat > /usr/local/apache/conf/includes/rpaf.conf << EOF LoadModule rpaf_module modules/mod_rpaf-2.0.so #Mod_rpaf settings RPAFenable On RPAFproxy_ips 127.0.0.1 $LIST RPAFsethostname On RPAFheader X-Real-IP EOF else /scripts/rebuildippool LIST=$(/scripts/ipusage | awk '{print $1}'|while read ip; do echo -ne "${ip} "; done) cat > /usr/local/apache/conf/includes/rpaf.conf << EOF LoadModule rpaf_module modules/mod_rpaf-2.0.so #Mod_rpaf settings RPAFenable On RPAFproxy_ips 127.0.0.1 $LIST RPAFsethostname On RPAFheader X-Real-IP EOF echo "Include \"/usr/local/apache/conf/includes/rpaf.conf\"" >> /usr/local/apache/conf/httpd.conf fi /etc/init.d/httpd restart