Using cPanel’s standardized hooks system

Working with Standardized Hooks While cPanel’s standardized hook documentation is great it lacks practical examples of how to add and remove non Perl based hooks. We’ll be looking at how to implement a simple bash script to maintain custom entries to Apache’s PHP configuration file across handler and PHP version…

read more

cPanel Tutorials

cPanel for sysadmins! This will be a series of tutorials on some of the more advanced things you can do with the cPanel web hosting automation software. We’ll be covering everything from building RPMs for use with EasyApache 4, automating tasks with the various APIs, standardized hooks to running your…

read more

New site hosting

A large chunk of content on this site was lost due to the power outage mentioned in the Gitlab post and like the good admin I am, my backups were hosted on the same server as the VM hosting this site. Luckily I did have some older backups on my workstation at…

read more

Performance monitoring with Sysdig

The Sysdig software seems highly geared towards containers like Docker but it works just as well on bare metal. The software is scriptable much like dtrace is. In order to work with this utility we must first install it. Download the following playbook, set the correct IP address in the…

read more

Memcached and WordPress

Increase your caching game with memcached on WordPress. We’ll be using the LEMP stack setup in https://blog.donthurt.us/2017/02/13/new-vps-setup/. Install the memcached service and PHP extension: yum install -y memcached php70u-pecl-memcached Enable and start the memcached service: systemctl enable memcached systemctl start memcached Reload the PHP-FPM and Nginx services: systemctl restart php-fpm…

read more

CloudLinux mod_lsapi benchmarks

CentOS release 7.3 KVM guest: 1 CPU core (E5-2620) 4GB RAM (DDR4 2133MHz). Apache Config: StartServers 1 MinSpareServers 2 MaxSpareServers 4 ServerLimit 100 MaxRequestWorkers 80 MaxConnectionsPerChild 5000 KeepAlive On KeepAliveTimeout 2 MaxKeepAliveRequests 20 Timeout 100 PHP-FPM 5.6 Zend OpCache / Apache 2.4.23 / Nginx 1.11.6 root@openstack.donthurt.us:~ # siege –concurrent=80 –reps=100 http://blog.donthurt.us…

read more

Softaculous and CageFS

Sometimes when installing CloudLinux after Softaculous is installed Softaculous is unable to detect PHP versions outside of the server’s native PHP installation. The following steps need to be taken to configure the pre_install hooks for Softaculous to recognize alt-php from the command line: # cp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/hooks/pre_install_cagefs{.txt,.php} # cp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/hooks/pre_upgrade_cagefs{.txt,.php} #…

read more

Changing PHP handlers outside of WHM

cPanel makes it easy to change the handler Apache uses to interpret and execute PHP code. Changing the PHP handler is much quicker if done through the command line. EasyApache 3 With EA3 the PHP handler can be changed with /usr/local/cpanel/bin/rebuild_phpconf using the following syntax: DEFAULT_PHPVER PHP4_HANDLER PHP5_HANDLER SUEXEC_MODRUID2 For…

read more