From Caddy1 to Caddy2

1. My Caddy version (2 devel):

I want to try Caddy for Rails applications. There is zero information on how to configure this. I only have a Caddyfile from v1:

https://domainname.co.uk {
  root /path/to/app/root
  log /path/to/app/root/log/access.log

  tls webmaster@domainname.co.uk

  proxy / unix:///path/to/your/capistrano/deployment/shared/tmp/sockets/appname-puma.sock {
    proxy_header Connection {>Connection}
    proxy_header Upgrade {>Upgrade}
  }
}

How can I translate this to v2?

Thank you!

Amazon EC2
Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-1052-aws x86_64)

Hi @JapArt, welcome to the Caddy community.

v2 docs can be a bit overwhelming in some points right now, as finalizing those will be one of the later steps in getting v2 out of beta.

If you want to go to a v2 Caddyfile, the directives for those are outlined here:

https://github.com/caddyserver/caddy/wiki/v2:-Documentation#caddyfile-directives

For the unix socket, the syntax is slightly different:

If you have a Unix socket, use an address in the form unix//path/to/socket.

https://github.com/caddyserver/caddy/wiki/v2:-Documentation#php_fastcgi

It’s noted in the php_fastcgi section, but applies to any upstream.