---
title: "How to Install NGINX on cPanel"
description: "In this article, we will outline how to install the popular NGINX web server software on your VPS or Dedicated Hosting account. Installing this software allows your web server to cache content and..."
url: https://www.inmotionhosting.com/support/server/nginx/install-nginx-on-cpanel/
date: 2020-03-23
modified: 2021-10-26
author: "InMotion Hosting Contributor"
categories: ["NGINX"]
type: post
lang: en
---

# How to Install NGINX on cPanel

![installing nginx on cpanel hero image](https://www.inmotionhosting.com/support/wp-content/uploads/2021/10/installing-nginx-on-cpanel-hero-image-1024x538.png)

In this article, we will outline how to install the popular NGINX web server software on your VPS or Dedicated Hosting account. Installing this software allows your web server to cache content and increase server performance. This ultimately translates into faster websites and better experiences for end users. The installation process requires both root WHM and SSH access and is only recommended for users with familiarity with Command Line Interfaces (CLI). As this process requires [root-level access](https://www.inmotionhosting.com/support/server/ssh/standard-vs-root-access/), it can only be performed on VPS or Dedicated Hosting accounts.

Topics Include:

- [Changing Listening Ports](#listen)
- [Installing NGINX](#install)

## Changing Listening Ports

![How to Change your Listening Ports in WHM](https://i.ytimg.com/vi_webp/bw_yvU19Ifg/maxresdefault.webp)

1. First, log into **WHM** as the **root user**.
2. Next, click the **Tweak Settings** link in the Server Configuration section.
3. On the Tweak Settings page click the “**>**” to scroll, then click the System tab when you see it.
4. Scroll down to the **Apache non-SSL IP/port options** and select the box to change ports. Since we want to set the listening ports to 8080 for InMotion servers, enter the following:0.0.0.0:8080
5. Navigate to the Apache SSL port setting and select the box to change the ports. Since InMotion uses port 8443 enter the following:0.0.0.0:8443
6. Scroll down to the bottom of the page and click the **Save** button to open the listening ports.

## Installing NGINX

1. First, connect to your server as the root user via SSH.
2. Once logged in, run the following command:yum -y install imh-ultrastack-ded
3. You will see the following message, type ‘y’, then press the enter key.`Install 1 PackageTotal download size: 484 kInstalled size: 1.3 MIs this ok [y/d/N]: y`The software has been installed successfully when you see a message such as this:`Installed:imh-nginx.x86_64 0:1.13.3-2.el7Complete!`

Congratulations, you have now installed NGINX!

## More Resources

To take full advantage of everything NGINX has to offer, please see the following resources:

- [Install cPanel Cache Manager](https://www.inmotionhosting.com/support/edu/cpanel/install-cpanel-cache-manager/)
- [NGINX Education Channel](https://www.inmotionhosting.com/support/server/nginx/)
