Introduction

A web server and reverse proxy to serve websites, route traffic, and secure applications.

// Often used in prod

// Does not upload or run code.

<aside> πŸ’‘

A typical β€œdeployment” flow usually includes:

  1. Build your app (frontend build, backend jar, etc.)
  2. Run the app 24/7 somewhere (VPS, Docker, Kubernetes)
  3. Point a domain to your server (DNS)
  4. Configure Nginx to route traffic
  5. Set up HTTPS (SSL) </aside>

Common uses

<aside> πŸ’‘

Nginx is free and widely used under the hood in many cloud setups. On a VPS or local server, you configure it directly.

</aside>

Nginx is sits in front of backend

🌍 Internet
- DNS route to public IP on VPS, reach into nginx first)
         ↓

🌐 Nginx (Reverse Proxy)
- Single public entry point
- Add security, SSL, routing, caching
- Horizontal scaling (load balance to instances)
         ↓
βš™οΈ Backend (Node.js / Java / Python)
         ↓
πŸ—„οΈ Database (MySQL / MongoDB)