Home / Server  / Installing Nginx on cPanel / WHM Server

Installing Nginx on cPanel / WHM Server

WHM Nginx cPanel

  is a  open source powerful web server which can handle millions of visitors. setup in reverse  will boost up / Server. cPanel does not officially support yet but we can set up  on cPanel using NginxCP installation script , which provide good performance with cPanel Servers because

Nginx setup in reverse proxy support static contents like css, images, swf file , javascript etc and forward the remaining dynamic requests to web server, that the process called  as Nginx reverse proxy and Nginx behaves like front end server.

 

Benefits of Nginx on cPanel & WHM :

  • Boost up server performance with Gzip compression.
  • Plugin Integrated with cPanel/WHM Service Monitor.
  • Nginx Admin help to manage Nginx directly from WHM .
  • Support of PHP Rewrite .
  • Selection of service Nginx or Apache on domain basis.
  • Nginx pass trusted web requests , this will protect from common attacks .

 

Steps to install Nginx Admin :

Access the server through SSH with root account and get terminal command line and go into the directory through below command .

 cd /usr/local/src

Download nginxadmin package through below command .

wget http://nginxcp.com/latest/nginxadmin.tar

Extract  the nginxadmin.tar in the same path .

tar xf nginxadmin.tar

After extract the publicnginx folder will be create in the same path and go to this directory.

cd publicnginx

Now run the nginx installer through below command.

./nginxinstaller install

 

If you got the like “access key doesn’t exist,”  then you need to create access key on cPanel / WHM Server ,  Follow below steps to configure access key through Control panel through  WHM Login.

Home >> Clusters >> Remote Access Key  >> Generate New Key

WHM Nginx cPanel

After Generate New key , now you can run again installer as above.

Now after successful run the installer script , the output will be look like below.

Welcome to the Nginx Admin installer......Starting Install    Please Wait .......    Generating vhosts...    Installing WHM interface...  …  …  ****************************************************  *               Installation Complete              *  *run /etc/init.d/httpd restart to start Nginx Admin*  ****************************************************

Restart nginx  with apache service .

For , or Cloud Linux 7 version :

systemctl restart httpd

Here i have run the status of httpd , i have got below output of the status of apache.

[email protected] [~]# systemctl status httpd  ● httpd.service - Apache webserver managed by cPanel    Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: di sabled)   Active: active (running) since Mon 2016-02-01 09:45:21 UTC; 4min 20s ago   Process: 32541 ExecStart=/usr/local/cpanel/scripts/restartsrv_httpd --no-verbo se (code=exited, status=0/SUCCESS)   Main PID: 26203 (code=exited, status=0/SUCCESS)   CGroup: /system.slice/httpd.service   ├─32551 /usr/local/apache/bin/httpd -k start   ├─32554 nginx: master process /usr/local/sbin/nginx -c /etc/nginx/...   ├─32555 nginx: worker process   ├─32556 nginx: worker process   ├─32557 nginx: worker process   ├─32558 nginx: worker process   ├─32559 nginx: cache manager process   ├─32561 /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/bin/...   ├─32562 /usr/local/apache/bin/httpd -k start   ├─32563 /usr/local/apache/bin/httpd -k start   ├─32564 /usr/local/apache/bin/httpd -k start   ├─32565 /usr/local/apache/bin/httpd -k start   └─32566 /usr/local/apache/bin/httpd -k start    Feb 01 09:45:20 server.XXXXX systemd[1]: Starting Apache webserver manage....  Feb 01 09:45:21 server.XXXXX restartsrv_httpd[32541]: Starting nginx daemo...  Feb 01 09:45:21 server.XXXXX systemd[1]: Started Apache webserver managed....  Hint: Some lines were ellipsized, use -l to show in full.

For CentOS , RHEL 5,6 version :

/etc/init.d/httpd restart

 

After installation you can check and manage Nginx Admin plugin . You can restart Nginx as well check login and configuration file from there.

WHM Nginx cPanel

 

A Linux Geek with Freelance Contributor, Server/ Cloud Administrator having 6+ Years experience in Open Source and Cloud Technologies.

Review overview
NO COMMENTS

POST A COMMENT