If you are working on a staging environment that contains domains that are not configured on the production shop, you can easily redirect those domains to staging rather than serving the default storefront.

To do this, first create a /data/web/nginx/http.staging_redir_mapping file containing:

Next, create a snippet to redirect all sites mapped as staging_site to the staging environment.
To do this, create a /data/web/nginx/server.staging_redir file containing:

Now all traffic for domains that are mapped as staging_domain, will redirect to the same URL but on port 8888.