Hostxpeed
Login Get Started →
Getting Started

How to Install Nginx on VPS

3 min read
22 views
Jun 10, 2026

Prerequisites

Before installing Nginx, make sure you have:

  • SSH access to your VPS
  • Root or sudo privileges

Install Nginx on Ubuntu/Debian

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22
apt update
apt install nginx -y

Start and Enable Nginx

systemctl start nginx
systemctl enable nginx

Configure Firewall

ufw allow 80/tcp
ufw allow 443/tcp

Verify Nginx is Running

systemctl status nginx

Visit your server IP in browser - you should see the Nginx welcome page.

Nginx Configuration Files

Main config: /etc/nginx/nginx.conf

Sites available: /etc/nginx/sites-available/

Sites enabled: /etc/nginx/sites-enabled/

✅ Nginx web server has been installed.

Was this article helpful?