This block redirects all http requests to https
```
server {
listen         80;
if ($http_x_forwarded_proto != "https") {
rewrite ^(.*) https://$host$1 permanent;
}
}```