
Redirect one domain to another with Nginx
Preserve paths and query strings in a domain redirect, rewrite changed paths, and retain valid TLS on the old hostname.
Focused answers for definitions, architecture choices, troubleshooting, pricing, and evaluation.

Preserve paths and query strings in a domain redirect, rewrite changed paths, and retain valid TLS on the old hostname.

Set up a bounded response cache, exclude personalized requests, inspect cache status, and manage expiry without confusing bypass with purge.

Render configuration templates before startup, preserve Nginx variables, and understand what the env directive actually does.

Set a persistent request-body limit on Elastic Beanstalk, account for application limits, and verify the deployed configuration.

Match the running Nginx binary and startup options, inspect its includes, and distinguish on-disk settings from an accepted reload.

Choose a directory index or an intentional directory listing, then check the actual path, permissions, and matched location.

Use the error log to separate filesystem permissions, SELinux, path mapping, and access rules before changing ownership.

Encrypt the upstream connection, verify its certificate, and configure SNI and the HTTP Host header deliberately.

Choose the right hash setting for long names or many virtual hosts, then test the smallest effective adjustment.

Find duplicate hostname mappings on the same listening address and port, and verify which virtual host receives each request.

Use the socket error code to distinguish permissions, a missing path, and a stopped FPM pool before changing listener settings.

Keep the requested host, path, and query string while handling named virtual hosts, certificates, and redirect methods correctly.