About NGINX
NGINX is a BSD-2-Clause, event-driven web server. Each worker process handles thousands of connections, which makes it a common front for static sites, PHP-FPM, Node.js or Python apps, and a load balancer for HTTP, TCP and UDP.
On a CloudSat VPS you control every directive, from caching rules to rate limits, on dedicated IPv4 and IPv6 with 40 Gbps host uplinks behind it.
After deploy NGINX serves its default page on port 80. Site configs live under /etc/nginx, and an ACME client such as Certbot adds HTTPS.
What you get with NGINX
- Static files with gzip and caching
- Reverse proxy with WebSocket and HTTP/2 support
- Load balancing for HTTP, TCP and UDP
- Rate limiting and access rules
- Graceful reloads without dropped connections
NGINX use cases
- Serve a static site or single-page app
- Front Node.js, Python or PHP apps with TLS
- Spread traffic across several backend servers
After you deploy NGINX
- When the server is Running, open
http://<server IP>/to see the NGINX welcome page. - Write a server block in
/etc/nginx/sites-available/(orconf.d/), enable it, and check the syntax withnginx -t. - Apply changes with
systemctl reload nginx, which keeps open connections alive. - Point your domain at the IP and get a certificate, for example with
certbot --nginx -d example.com.
NGINX ports
Open these in your firewall if you use one: 80/tcp HTTP, 443/tcp HTTPS.
NGINX FAQ
Should I use NGINX or Apache?
NGINX holds many idle connections in little memory and shines as a proxy, while Apache's .htaccess files suit shared PHP hosting. Some stacks run NGINX in front of Apache to get both.
How do I proxy an app running on port 3000?
Add location / { proxy_pass http://127.0.0.1:3000; } to the server block, plus proxy_set_header Host $host;, then test and reload.
Disclaimer. The NGINX project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.