Nginx Reverse Proxy in Front of a Private Application
The application lives on server2 and only the edge may talk to it. Put nginx on server1 in front of it under a public name, forward the headers the app needs, bound the timeouts, let SELinux allow exactly that, then take the backend away and watch the proxy recover on its own.
Skill labintermediate~50 minPro
What you'll do
- ✓Prove the edge reaches the backend and the requester does not
- ✓Write an nginx upstream and server block with forwarded headers and bounded timeouts
- ✓Allow the proxy's outbound connection with an SELinux boolean and state its scope
- ✓Open the firewall for HTTP and start nginx enabled
- ✓Observe a controlled 502 while the backend is down and a recovery with no proxy change
Lab outline
- 01The path and the fence
- 02Build the edge on server1
- 03Use it, break it, recover
Before you start
- Create and Harden a Custom systemd Service
- firewalld Zones and Least-Privilege Access
- Repair SELinux File Contexts
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.