https

Nginx default server with https

I have a few domains/vhosts set up on my server and I recently disabled one of them. When I wanted to make sure that it wasn't online anymore and tried to access it I noticed that nginx had picked one of my other vhosts (from dokku) as the default server for https:443. That's no good. It's easy to remedy though, I found the fix here [https://serverfault.com/a/846214] but I'll put it here as well for keeping. Create default zone (sudo) touch /etc/nginx/sites-available/00-default ln -s /etc/ngi

Nginx, Ghost and https

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 [https://github.com/TryGhost/Ghost/issues/2796#issuecomment-51871863]. 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