server {
  listen         [::]:80;
  return 301 https://$host$request_uri;
}

via ServerFault