---

Redirect HTTP to HTTPS in Nginx

The preferred method to redirect HTTP to HTTPS in Nginx is to configure a separate server block for each version of the site.