Blog

How to Install NginxCP on cPanel/WHM

Nginx is a fantastic, free, open-source, high-performance HTTP server and reverse proxy. It is one of the most popular tools used to power many websites, and can be implemented quite easily on a new server or live production server.


First of all, with the latest version on NginxCP, regardless of whether you have IPv6 addresses, you must have the service enabled. Otherwise, the latest version of NginxCP will not run, and you will be left scratching your head, and uninstalling. Below is the error message you will see in such instances –

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

Enable IPv6 on RHEL 5.0 / RHEL 6.0

First, we need to enable IPv6 in /etc/sysconfig/network]

nano /etc/sysconfig/network

It will look something like this –

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server.example.info
DOMAINNAME=example.info

You need to change NETWORK_IPV6 to yes

NETWORKING_IPV6=yes

Next, you need to ensure that disabling IPv6 in /etc/modprobe.conf is removed or commented out. If these lines aren’t there, you can skip this step.

nano /etc/modprobe.conf

May look similar to this –

alias eth0 r8168
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 ahci
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1


Comment out or delete the following: allias net-pf-10 off, alias ipv6 off, options ipv6 disable=1

alias eth0 r8168
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 ahci
# alias net-pf-10 off
# alias ipv6 off
# options ipv6 disable=1

If you have not updated modprobe.conf, then you just need to restart the network service

service network restart

If you have updated modprobe.conf, you will need to restart your system for the changes to be made<

reboot

Once the server comes back online, you will then need to recompile EasyApache so that everything works correctly with the IPv6 configuration. To do so

Login to WHM, go to EasyApache and click Build Profile Now.

Now, you’re ready to install NginxCP

To install NginxCP on your WHM, login to PuTTy and do the following –

cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar
cd publicnginx
./nginxinstaller install

Once the installation has completed, reboot the httpd service

/etc/init.d/httpd restart


Uninstall NginxCP

Tags: ,