cpxstack is a cPanel plugin written by SysAlly. This guys have done an awesome job on this tool. cpxstack is the definitive solution if you need to install php-fpm and nginx on a cpanel server.
As you know, once installed cPanel is a very agressive control panel as it gets totally fusioned with the Linux OS, it doesn’t allow to run normal php yum installations as you can do on a standalone CentOS server (without any control panel). This was one of the main issues I found while trying to install php-fpm on a cPanel server. However I found this great piece of software and it works perfectly.
Here you have a very ilustrative video of what you can do with cpxstack:
Why you should use cpXstack
- It provides an alternative way to get more performance by running a different webserver and PHP stack than the one supported by Cpanel.
- cpXstack WHM module allows to set a limit for the numer of php-fpm process of each system user.
- Nginx consumes less RAM and it’s 2x or more faster than common web servers. Nginx also has better security settings that makes it more resistent to DDOS attacks and common floods. On the other hand, PHP-FPM has more features than usual FastCGI implementations and it’s perfect for high traffic websites.
- cpxstack also provides the final user to choose between php 5.3.x and 5.4.x.
- Clean install and uninstall process, you can switch to apache and mod_php at any time and stop using the plugin if you need, and your website will continue working normally with your previous configurations.
- Finally: it’s 100% free!
Installing cpxstack on cPanel
- 500 Mb free or more space on your /opt directory
- Cpanel version 11.31 or greater
- Devel packages to compile PHP from source (installed by default by cPanel software)
The installation script will install Nginx from the official Nginx yum repo and incron from the EPEL repo . Once ready PHP and cpxstack files will be installed to /opt/pifpm directory .
screen -S cpXstack wget http://sysally.net/pifpm/cpxstack.sh chmod a+x cpxstack.sh ./cpxstack.sh install
How to activate Nginx and PHP-FPM on each site?
On each cPanel account you will find a link called “cpxstack”, there you will be able to choose your php version, enable or disable Nginx and also a way to add your root (public_html) rewrite rules on an option called ‘Manage’.
On WHM Plugin section, you will find a resume of each cpanel account showing wheter nginx and php-fpm is active or inactive, and you will be able to specify the php-fpm process each cpanel user will use.
Need to read more about cpxstack?
Popular search terms:
- https://www scalescale com/tips/nginx/cpxstack-nginx-php-fpm-cpanel/
- PHP-FPM whm
- cpanel nginx php-fpm