newbie using regex.custom.pm
Posted: 03 Apr 2014, 15:04
hello all -
Sergio was kind enough to introduce me to regex.custom.pm. i need to block access to the wordpress file wp-login.php.
here is what i am proposing to do:
1) file /etc/httpd/conf/httpd.conf
change:
CUSTOM2_LOG = "/var/log/messages"
to:
CUSTOM2_LOG = "/var/log/virtualmin/marksdomain.com_access_log"
2) file /usr/local/csf/bin/regex.custom.pm
add:
any thoughts, tips or suggestions?
Sergio was kind enough to introduce me to regex.custom.pm. i need to block access to the wordpress file wp-login.php.
here is what i am proposing to do:
1) file /etc/httpd/conf/httpd.conf
change:
CUSTOM2_LOG = "/var/log/messages"
to:
CUSTOM2_LOG = "/var/log/virtualmin/marksdomain.com_access_log"
2) file /usr/local/csf/bin/regex.custom.pm
add:
Code: Select all
if (($lgfile eq $config{CUSTOM2_LOG}) and ($line =~ /wp-login.php/)) {
return ("Failed wp-login.php login from",$1,"wp-login.php","5","80,8080","1");
}