DevOps

How to Install and Configure Nginx on Linux Server

LinuxNginxWeb ServerDevOps

How to Install and Configure Nginx on Linux Server

Introduction

Nginx is a high-performance web server used for hosting websites, APIs, and reverse proxies.

Prerequisites

  • Linux server (Ubuntu 20.04+)
  • Sudo or root access

Step 1 — Update System

sudo apt update && sudo apt upgrade -y

Step 2 — Install Nginx

sudo apt install nginx -y

Step 3 — Start and Enable Nginx

sudo systemctl start nginx
sudo systemctl enable nginx

Step 4 — Firewall Configuration

sudo ufw allow 'Nginx Full'
sudo ufw reload

Step 5 — Verify Installation

Open browser:

http://SERVER_IP

Step 6 — Basic Server Block

server {
    listen 80;
    server_name example.com;
    root /var/www/example.com;
    index index.html;
}

Conclusion

Nginx is installed and ready for production use.

Author

Marquefactory DevOps Team

Need help applying this?

Discuss your software idea, product roadmap, or internal system

If this article connects to a product idea, workflow problem, MVP plan, or custom platform requirement, we can help you turn it into a scoped delivery plan. MarqueFactory works with founders and businesses that need senior technical judgment, not just implementation tickets.

  • MVP planning and custom SaaS development
  • Web apps, mobile apps, and internal systems
  • Architecture, delivery roadmap, and build estimates
  • Senior-led product and engineering guidance

Related Services

If this topic connects to a real build, these are the pages most likely to help you evaluate fit, scope, and delivery approach.

Useful Tools

These free tools are useful on their own, and they also reflect the kinds of systems we help businesses turn into custom platforms.

Related Articles