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:

GitHub - caddyserver/caddy: Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

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.

GitHub - caddyserver/caddy: Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.