Category: "LAMP"

CentOS 7 - Fail2Ban with Apache ModSecurity

One of the tools I am using to secure a server is Fail2ban. It was working well for SSH and I wanted to extend it to provide more protection for Apache. I installed it and enabled it. jail.d/apache-modsecurity.conf [apache-modsecurity] enabled = true… more »

Find the PHP session files that are older than 24 minutes

Shell sudo find /var/lib/php/session -mmin +24 -type f -exec ls -l {} \; Yes, that's the whole post more »

Apache 2.4 virtual host specific PHP-FPM error logs

If you are using PHP-FPM with Apache and you would like to separate the error logging by user, directory or virtual host, you can use the ProxyFCGISetEnvIf directive In a server level Apache .conf file Code <Directory /home/user/public_html>… more »

AMI - upgrade PHP from 7.1 to 7.3

Don't do this on a production system I ran this on an Amazon Linux AMI - it's probably fine on CentOS, etc. Get all the PHP 7.1 packages and make a file called php. You might have to change the .x86_64 to .i386/.i686 Code sudo yum list installed php71*… more »

DataTables - Passing Data to the Server in Client-Side processing mode

DataTables is AWESOME. I use it for list-based selection, table-based editing, data display and filtering and anything else I can think of because it is so robust that virtually anything is possible. Really. If the dataset being used is fairly small… more »