I would have put ```rewrite ^(.*) https://$host$1 permanent;``` , but in fact a redirect  permanent 301 is better.