> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing the Nginx web server

> Learn how to install the popular Nginx web server on your unmanaged hosting account!

This article describes how to install Nginx, a popular web server noted for its high performance. Nginx was originally designed as an alternative to the Apache web server, with an emphasis on speed.

<Warning>
  **Important**

  You must have root access to the server to follow the procedures described below.
</Warning>

## Installing Nginx

To install Nginx, follow the appropriate procedure below for the Linux distribution installed on your server. If your server does not use any of the following Linux distributions, see the documentation for your distribution for information about how to install Nginx.

### Debian and Ubuntu

To install Nginx on Debian and Ubuntu, follow these steps:

1. Log in to the server [using SSH](/docs/using-ssh-secure-shell).

2. As the root user, type the following commands:

   ```bash theme={null}
   apt update
   apt install nginx
   ```

3. Use your web browser to visit the IP address (or domain name, if you have one configured) of your server. You should see the default **Welcome to nginx!** page.

### AlmaLinux and Fedora

To install Nginx on AlmaLinux and Fedora, follow these steps:

1. Log in to the server [using SSH](/docs/using-ssh-secure-shell).

2. As the root user, type the following commands:

   ```bash theme={null}
   yum -y update
   yum -y install epel-release
   yum -y install nginx
   systemctl enable nginx
   ```

3. Use your web browser to visit the IP address (or domain name, if you have one configured) of your server. You should see the default **Welcome** page.

## Publishing web content

The default document root directory location varies depending on the Linux distribution you are using:

* For Debian and Ubuntu, the document root directory is */var/www/html*.

* For AlmaLinux and Fedora, the document root directory is */usr/share/nginx/html*.

To publish content, place your files in the document root directory so site visitors can access them.

## More information

To view the official online documentation for Nginx, please visit [http://nginx.org/en/docs](http://nginx.org/en/docs).
