ScaleScaleScaleScale

Tips / Nginx


cpxstack: Nginx and PHP-FPM for cPanel servers

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

System Requirements:

  • 500 Mb free or more space on your /opt directory
  • Cpanel version 11.31 or greater
  • bzip2
  • 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?

cpxstack: http://cpxstack.sysally.net/
Documentation: http://cpxstack.sysally.net/documentation.htm
Wiki: https://support.sysally.net/projects/cpxstack/wiki/Documentation

Popular search terms:

  • https://www scalescale com/tips/nginx/cpxstack-nginx-php-fpm-cpanel/
  • CPXStack
  • PHP-FPM whm
  • cpanel nginx php-fpm
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking

  • very nice plugin i installed and working awesome. i like nginx

  • Plugin is good but support is bad. They will only give you favor for any problem with plugin which is rare case.
    Documentation is not fully made. you can not get enough support as there is no discussion on how to make it more stable with cache and purge support as rtcamp website was giving tutorials but they are not as this is only included in premium support which cost you from 20 to 150 or more dollars.
    which is a big amount for small users.

  • admin

    @Waseem

    Plugin is FREE, so be thankful for that. If you want support, then pay for it.

  • dolomats

    pluging isent working anymore ?

    when i try download it get this message :

    root@server [~]# wget http://sysally.net/pifpm/cpxstack.sh
    –2014-12-19 14:22:08– http://sysally.net/pifpm/cpxstack.sh
    Resolving sysally.net… 37.139.16.207
    Connecting to sysally.net|37.139.16.207|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    2014-12-19 14:22:08 ERROR 404: Not Found.