Caddy as Proxy for Rails 6.1 app with Puma

1. Caddy version (caddy version): 2.4.2 h1:chB106RlsIaY4mVEyq9OQM5g/9lHYVputo/LAX2ndFg=

2. How I run Caddy:

I run Caddy on Ubuntu 20.04 server hosted at AWS

a. System environment:

I have Rails, Ruby 3.0.1 and a LAMP stack installed on server

b. Command:

caddy start

c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:

# The Caddyfile is an easy way to configure your Caddy web server.


# Unless the file starts with a global options block, the first

# uncommented line is always the address of your site.


# To use your own domain name (with automatic HTTPS), first make

# sure your domain's A/AAAA DNS records are properly pointed to

# this machine's public IP, then replace ":80" below with your

# domain name.

:80 {

# Set this path to your site's directory.

root * /usr/share/caddy

# Enable the static file server.


# Another common task is to set up a reverse proxy:

# reverse_proxy localhost:8080

# Or serve a PHP site through php-fpm:

# php_fastcgi localhost:9000


3. The problem I’m having:

I am not having a problem, but I am looking for a solution.

I would like to run Caddy as a Proxy for my Rails 6.1 application running Puma and would like to see if anyone has done this, and if so, what does your Caddy configuration file is like, and what other advice you may have. I am brand new to Caddy.

4. Error messages and/or full log output:

5. What I already tried:

So far, I’ve installed Caddy on the server

6. Links to relevant resources:

Please adjust the formatting in your post, and please completely fill out the help topic template. We can’t help if we can’t read your post.

This topic was automatically closed after 30 days. New replies are no longer allowed.