Moving from Nginx to Caddy

After see the release of Caddy 0.8 with Let's Encrypt integration.

I installed Caddy downloading the package from this page.

After download and extract the binary, I ran it with my initial Caddyfile:

gmnt.net, www.gmnt.net {
  gzip
  root /home/gabriel/gmnt.net/public 

  log /home/gabriel/caddy/blog.log {
    rotate {
      size 100 # Rotate after 100 MB
      age  14  # Keep log files for 14 days
      keep 10  # Keep at most 10 log files
    }
  }
}

I know that exists one extension to integrate Caddy and Hugo, but specifing the root of the site is enough for me.

After run, automatically I got this blog running in HTTPS. _o/

To access my applications, I add subdomains to the Caddyfile, for example:

xyz.gmnt.net {
  proxy / localhost:1234 {
    proxy_header X-Real-IP {remote}
  }
}

I have no reason to move from Nginx to Caddy, except the feature of setup HTTPS easily with Caddy. I tried, it works, then no reason to go back.

Congratulations to Caddy and Let's Encrypt for the nice work!