Section 2 · DevOps / Deploy
VPS & nginx for Static Sites — Setup TTFB ≤50ms in 30 Minutes
Beget Cloud (290₽), Hetzner (€4), DigitalOcean ($6) — choose a VPS, install Ubuntu 24.04, configure nginx with gzip/brotli compression and 30d caching. Result: TTFB ≤50ms, 0 vulnerabilities.
Optimal VPS for static site GitHub CMS: Ubuntu 24.04, 512MB RAM, 1 vCPU, nginx with gzip/brotli compression and 30d static caching. Cost from 290₽/mo (Beget Cloud) or €4/mo (Hetzner CX22). After configuring nginx.conf with gzip_static, brotli, expires 30d and security headers (CSP, HSTS, X-Frame-Options), TTFB drops to ≤50ms. For comparison: WordPress hosting costs 500-1500₽/mo with TTFB 600-1200ms.
TL;DR
Ideal VPS: Ubuntu 24.04, 512MB RAM, nginx + gzip/brotli, cache 30d. Cost 290-500₽/mo. TTFB ≤50ms.
Definition
VPS — virtual server for deploying static sites. nginx — web server #1 (34% market share), serving HTML/CSS/JS with TTFB ≤50ms.
Key Facts
TTFB ≤50ms after optimization
nginx + gzip/brotli + cache 30d. Static HTML — 0 latency from PHP and DB. [nginx, 2026]
512MB RAM — enough
Static site with 56 pages consumes 150-250MB. WordPress: minimum 1-2GB. [Ubuntu 24.04]
290₽//mo — Beget Cloud
Cheapest VPS in Russia. Hetzner: €4//mo. DigitalOcean: $6//mo. [2026]
gzip + brotli — compression to 80%
HTML: compression 75-80%. CSS/JS: 70-75%. Traffic decreases by 3-5×. [Google compression study]
Caching 30d — instant upload
expires 30d for static. Repeat visits — 0 requests. [nginx expires]
Security headers — 0 vulnerabilities
CSP, HSTS, X-Frame-Options, X-Content-Type-Options. [OWASP, 2025]
Four Infrastructure Components
Each layer optimized for TTFB ≤50ms
VPS-server
Ubuntu 24.04 LTS, 512MB-1GB RAM, 1 vCPU, 20-25GB SSD. Beget Cloud (290₽), Hetzner (€4), DigitalOcean ($6).
nginx
Web server #1 (34% market share). Serves static directly. gzip/brotli compression, expires 30d.
Let's Encrypt SSL
Free HTTPS certificate. Certbot — autoupdate each 60 days.
Security headers
CSP, HSTS max-age=31536000, X-Frame-Options DENY, X-Content-Type-Options nosniff.
Problem → Solution → Result
Why Shared Hosting Loses to a Dedicated VPS with nginx
Comparison of VPS Providers
How nginx Speeds Up Static Sites: 4 Mechanisms
gzip_static on
nginx serves pre-compressed compressed .gz files from vite build. HTML is compressed on 75-80%, traffic decreases by 3-5×. -75-80% trafficand
brotli on
Google's algorithm — 15-20% more effective than gzip. nginx with the brotli module serves .br files. +15-20% to gzip
expires 30d
Browser caching of static for 30 days. Content-hash in filenames — auto-invalidation on updates. 0 requests at repeat
Security headers
CSP, HSTS max-age=31536000, X-Frame-Options DENY, nosniff. 0 vulnerabilities from OWASP Top-10. 0 OWASP Top-10
Step-by-Step VPS & nginx Setup: 6 Stages
From purchase to TTFB ≤50ms — 30 minutes
Selection and purchase of VPS
Beget Cloud (290₽), Hetzner (€4) or DigitalOcean ($6). Ubuntu 24.04 LTS, 512MB-1GB RAM. Get IP, root access. 5 min
Basic Ubuntu setup
apt update && apt upgrade. Create a user (not root). SSH: disable root login, keys only. ufw allow 22,80,443/tcp. 5 min
nginx installation
apt install nginx -y. server_name, root /var/www/site/current. nginx -t && systemctl restart nginx. Site on port 80. 5 min
Optimization: gzip, brotli, cache
gzip_static on, brotli on, expires 30d, sendfile on, tcp_nopush on. gzip_comp_level 6. TTFB ≤50ms. 10 min
SSL via Let's Encrypt
certbot --nginx -d site.ru. Auto-update via cron every 60 days. HTTPS works. 3 min
Security headers
CSP, HSTS, X-Frame-Options DENY, nosniff. curl -I for checks. Security A+. 2 min
E-E-A-T infrastructure: 4 signals of reliability
Experience
nginx — 34% market share (Netcraft, 2026). Ubuntu 24.04 LTS — 10 years of support. Industry standards.
Expertise
Optimized nginx.conf: gzip_static, brotli, expires 30d, CSP. TTFB ≤50ms — confirmed expertise.
Authority
Let's Encrypt (460+ M certificates), Ubuntu (Canonical), nginx (F5 Inc). OWASP Top-10: 0 vulnerabilities.
Trust
HTTPS out of the box. HSTS for a year. CSP blocks injected scripts. Autoupdate SSL each 60 days.
Example optimization nginx for GitHub CMS
gzip_static on + brotli on
nginx serves .gz/.br files from build. HTML compression up to 80%.
expires 30d for static
CSS/JS/images are cached on 30 days. Repeat visits — instant.
Security headers in server-block
CSP, HSTS, X-Frame-Options — in one line.
nginx Configuration: Key Directives
Case Studies: VPS & nginx in real projects
8 benefits VPS + nginx
TTFB ≤50ms — in 12-24× faster
nginx + gzip/brotli + cache 30d. Shared-hosting: 600-1200ms. [Google Research, 2024]
290₽//mo — to 80% savings
Beget Cloud vs 500-1500₽//mo shared-hosting. [Beget, 2026]
100% control nginx.conf
Full access: gzip_level, brotli, expires, CSP. [nginx]
Unlimited traffic
Beget Cloud: ∞ traffic. Hetzner: 20TB. [Beget, 2026]
brotli — +20% to compression gzip
Not available on shared hosting. [Google compression study]
150-250MB RAM — all that's needed
nginx + static. WordPress: 1-2GB. [Ubuntu, 2026]
Security headers — 0 vulnerabilities
CSP, HSTS, X-Frame-Options. [OWASP, 2025]
Readiness for highload out of the box
nginx: 10,000+ connections on 512MB. [nginx benchmarks]
Roadmap: From Zero to a Working VPS
FAQ by VPS & nginx
Set Up Your VPS in 30 Minutes — Get TTFB ≤50ms for 290₽/mo
Beget Cloud → Ubuntu 24.04 → nginx with gzip/brotli → Let's Encrypt → security headers. Performance 12-24× higher than shared hosting.