If you no longer want NGINX on your server, you can easily remove the package to un-install it. In this tutorial we will walk you through removing NGINX from your cPanel server. First, you will have to change the listening ports back to the default settings in WHM. Then we will show you how to un-install NGINX from your server via SSH.
Change Listening Ports
- Log into WHM as the ‘root‘ user.
- Click the Tweak Settings link in the Server Configuration section.
- On the Tweak Settings page click the right arrow to scroll, then click the System tab when you see it.
- Scroll down to the Apache non-SSL IP/port options and select the following default option:
- Navigate to the Apache SSL port setting and select the following option:
- Scroll down to the bottom of the page and click the Save button to open the listening ports.
- Connect to your server as the ‘root” user via SSH.
- Run the following command to install NGINX.
yum remove imh-nginx
- You will see the following message, type ‘y‘ for yes then click the enter key.
Remove 1 Package (+2 Dependent packages) Installed size: 3.7 M Is this ok [y/N]: y
The NGINX package will then be removed. You are finished when you see a Complete! message such as this:
Removed: imh-nginx.x86_64 0:1.13.3-2.el7 Dependency Removed: imh-cpanel-cache-manager.noarch 0:1.0-3.el7 imh-ngxconf.noarch 0:0.9.10-1.el7 Complete!
Congratulations, now you know how to un-install NGINX from your server!