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

# Host a Website on a Linux VPS using Nginx

> Install Nginx on a FlashRDP Ubuntu VPS, configure a server block, and deploy a fast static or dynamic website with proper TLS and DNS setup.

Hosting a website on a [FlashRDP Linux VPS](/docs/linux-vps/overview) instead of a shared host gives you incredibly fast load times and complete control over your environment.

The industry standard for serving web traffic is **Nginx**. It's lightweight, incredibly fast, and very easy to set up. Here's how to host a basic website on Ubuntu.

## Step 1: Install Nginx

[Log into your FlashRDP Linux VPS via SSH](/docs/linux-vps/ssh-access) and run the following commands to update your package list and install Nginx:

```bash theme={null}
sudo apt update
sudo apt install nginx -y
```

Once installed, Nginx starts automatically. If you type your FlashRDP server's IP address into your web browser, you should see the default "Welcome to nginx!" page.

## Step 2: Upload Your Website Files

By default, Nginx looks for website files in `/var/www/html`.

You can upload your `index.html`, CSS, and JS files there using an SFTP client (like FileZilla or Cyberduck) using the exact same IP, username (`root`), and password you use for SSH.

## Step 3: Set Up Your Domain (Optional but Recommended)

If you have a domain name (like `yourwebsite.com`), you should set up a "Server Block" so Nginx knows how to route traffic.

1. Create a new folder for your domain:
   ```bash theme={null}
   sudo mkdir -p /var/www/yourwebsite.com
   ```
2. Create a new configuration file for Nginx:
   ```bash theme={null}
   sudo nano /etc/nginx/sites-available/yourwebsite.com
   ```
3. Paste the following configuration, changing `yourwebsite.com` to your actual domain:
   ```nginx theme={null}
   server {
       listen 80;
       server_name yourwebsite.com www.yourwebsite.com;
       root /var/www/yourwebsite.com;
       index index.html;
   }
   ```
   *Save and exit nano by pressing `Ctrl+X`, then `Y`, then `Enter`.*
4. Enable the site and restart Nginx:
   ```bash theme={null}
   sudo ln -s /etc/nginx/sites-available/yourwebsite.com /etc/nginx/sites-enabled/
   sudo systemctl restart nginx
   ```

That's it! If you pointed your domain's DNS A-Record to your FlashRDP server's IP address, your website is now live!

## Related Articles

<CardGroup cols={2}>
  <Card horizontal title="Host SEO Crawlers (Screaming Frog, Puppeteer)" icon="search" href="/docs/guides/seo-crawler-hosting" />

  <Card horizontal title="Run MT4 / MT5 for Forex Trading on a VPS" icon="trending-up" href="/docs/guides/mt4-forex-trading" />

  <Card horizontal title="Secure Your Windows RDP" icon="shield-half" href="/docs/security/rdp-security" />
</CardGroup>
