Redirect HTTP to HTTPS in nginx Snippet·December 8, 2016 server { listen 80; server_name shop.example.com; return 301 https://$host$request_uri; }