This is the Cpnginx auto installer script . Please read more about from https://cpnginx.com/documentation/
wget https://github.com/peter21581/cpanel-nginx/archive/master.zip -O cpanel-nginx-master.zip && upzip cpanel-nginx-master.zip;
cd cpanel-nginx-master && chmod 755 install.py && ./install.py install;
wget https://github.com/peter21581/cpanel-nginx/archive/master.zip -O cpanel-nginx-master.zip && upzip cpanel-nginx-master.zip;
cd cpanel-nginx-master && chmod 755 install.py && ./install.py remove;
/etc/cpnginx/updatecpnginx.py
This is a new command line tool for managing your cpnginx server. It is a unique tool developed by cpnginx developers. You can do almost all operations of your nginx server from command line.
nginxctl help
1) build : This option will help you to build some of the nginx tools. To build the nginx server run the following command
nginxctl build nginx
nginxctl build nginx --version 1.11.1
nginxctl build vhosts
nginxctl build sslcerts
2) setupphpfpm : This option will automatically setup all multi-php fpm servers. It will use the cpanel provided multiple php binaries itself. This tool also set the default phpfpm as your servers default php version. Everything is automated . To update the phpfpm binaries please run the following commands
nginxctl setupphpfpm
3) rebuildvhost : This option will help you to rebuild the vhost settings of a domain or subdomain. Use the following syntax to run the commmand
nginxctl rebuildvhost < domain name >
4) rmvhost : This option will help you to remove a vhost entry of domain or subdomain from the server. It will automatically remove ssl and non-ssl vhosts from the nginx pool.
nginxctl rmvhost < domain name >
5) rebuilduservhost : This option will help you to rebuill all domains vhost files of a cpanel user. This will build that users ssl or non-ssl domains and setup the php-fpm pools of the domains automatically
nginxctl rebuilduservhost < cpanel user name >
6) rmuservhost : This option will remove a all nginx vhost files of a cpanel user. This will automatically remove the users php-fpm pool configurations, ssl domains and non-ssl domains. It only remove the nginx related files.
nginxctl rmuservhost < cpanel user name >
7) templaterebuild : This option will rebuild all your nginx templates and apps templates pools. It will be automatically added to the cpnginx interface. You should run this command after making your own nginx vhost template files or app templates
nginxctl templaterebuild
8) restart :This options will restart your nginx server. To restart the nginx server run the following command
nginxctl restart