When moving this blog from a temporary url to my main jonnev.se I got the dreadful "Too many redirects". There is a simple fix which I found here.

Add proxy_set_header X-Forwarded-Proto https; to the conf. Mine now looks like this:

server {
  listen 443 ssl;
  ssl_certificate /etc/letsencrypt/live/jonnev.se/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/jonnev.se/privkey.pem;

  server_name jonnev.se www.jonnev.se;

  client_max_body_size 20M;
  keepalive_timeout 10;

  location ~ /.well-known {
    allow all;

  location / {
    proxy_redirect off;

    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto https;
    proxy_set_header        Host $http_host;
    proxy_intercept_errors  on;