Run Two Environments on One Domain with Nginx: Traffic Splitting, Auth & Cache Isolation
This guide shows how to use Nginx to route production and test traffic on the same domain using IP allowlists, a test cookie, and Basic Auth, while isolating sessions, caches, and dependencies to prevent cross-environment contamination.
