How to Un-Install NGINX

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

  1. Log into WHM as the ‘root’ user.
  2. Click the Tweak Settings link in the Server Configuration section.
  3. On the Tweak Settings page click the right arrow to scroll, then click the System tab when you see it.
  4. Set Default Listening PortsScroll down to the Apache non-SSL IP/port options and select the following default option:
     0.0.0.0:80 default
  5. Set Default SSL PortNavigate to the Apache SSL port setting and select the following option:
    0.0.0.0:443 default
  6. Scroll down to the bottom of the page and click the Save button to open the listening ports.

Un-Installing NGINX

  1. Connect to your server as the ‘root” user via SSH.
  2. Run the following command to install NGINX.
    yum remove imh-nginx
  3. 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!

JB
John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

Was this article helpful? Join the conversation!