Server Deployment: Nginx, Processes, and Reverse Proxy
The server route gives you more control, but it also means you take on more responsibility.
When Is the Server Route Worth It
You need it if you require:
- Login and permission systems
- Dynamic APIs
- Databases
- File uploads
- Admin panels
- Custom runtime logic
Only then does the server route make more sense.
For a content-only site, it is usually not the first choice.
A Typical Server Architecture
Browser
↓
DNS / CDN
↓
Nginx
↓
Application process
↓
Database / Cache / Object storage
What Each Layer Is Roughly Responsible For
Nginx
Common responsibilities:
- Listening on ports 80 / 443
- Configuring HTTPS
- Reverse proxying to the backend application
- Serving static files directly
- Handling redirects and some cache control
Application Process
For example, Node, Python, Java, or other server processes that handle APIs and business logic.
Data Layer
Databases, caches, object storage, and so on.
Why Complexity Increases Significantly With the Server Route
Because you are no longer just uploading a set of static files. You must maintain long-term:
- Whether the process stays alive
- How to view logs
- How to open ports
- How to renew certificates
- How to roll back failed deployments
- How to protect the server from exposure and misconfiguration
Most Common Mistakes on a First Self-hosted Setup
1. Directly Exposing the Application Port
A more common and more stable approach is to have the application listen only on the internal network or localhost, and let Nginx handle external access uniformly.
2. Reverse Proxy Works, But Static Asset Paths Are Broken
A successful main page request does not mean JS, CSS, and image paths are also correct.
3. Only Getting the Site Running Without Process Management
When the service crashes it is gone, or after a machine restart the service does not recover automatically.
4. Only Configuring HTTPS From the Browser to the Proxy Layer
If there is a Cloudflare or proxy layer in front of you, the origin leg of the chain also needs to be considered.
A Practical Deployment Approach
If you must build your own server, at minimum:
- Let Nginx handle the unified entry point
- Do not expose the application process directly to the public internet
- Separate responsibilities for static assets, application services, and uploaded files
- Plan for logs, certificates, backups, and restart strategies in advance
What Are the Real Additional Costs Compared to Static Hosting
- Server renewal and maintenance
- System updates
- Security surface exposure
- Troubleshooting complexity
- Monitoring and backup pressure
So if you are only building documentation and showcase pages, do not rush into self-hosting.
What To Read Next
- To connect DNS / proxy / HTTPS: Cloudflare Setup, Proxying, and HTTPS End To End
- To continue with performance: Web Performance Basics: From First Screen To Cache Strategy