Skip to content
ohsudo, Home

Tags

#react

single-page app
Networking

Nginx for a React or Vite single-page app: routes, caching and an API proxy

Serve a React, Vue or Vite single-page app with Nginx: fix 404s on refresh with try_files, cache hashed assets, avoid caching index.html, and proxy /api to your backend.

Beginner · 3 min read

Next.js
Networking

Nginx for Next.js: a production config with HTTPS, caching and standalone builds

Run Next.js behind Nginx: a complete config with HTTPS and long caching for _next/static, the standalone build, a systemd service, and the errors people run into.

Intermediate · 3 min read