Serving Ajenti on a subdomain

I’m trying to configure Caddy to serve Ajenti on a subdomain. I’m not getting any errors in the browser. But when loading the page it just returns a blank page. I get redirected to min.mysite.com/view/login/normal

CaddyFile

https://mysite.com {
  encode zstd gzip
  root * /home/azureuser/apps/mysite/current/public
  file_server
  tls antarr@hey.com
  @notStatic {
        not file
  }
  reverse_proxy @notStatic unix//home/azureuser/apps/mysite/shared/tmp/sockets/we-vote-puma.sock
  header / {
    Strict-Transport-Security "max-age=31536000"
  }
}

monitoring.mysite.com {
  @notStatic {
     not file
  }
  reverse_proxy @notStatic localhost:2812
  tls antarr@hey.com
}

min.mysite.com {
  reverse_proxy / localhost:8000
  tls antarr@hey.com
}

Remove the /.

Path matching is exact in Caddy. Using / as the matcher will make Caddy only match requests to exactly / and nothing else, so it’ll fall through and just return a blank response (because Caddy wasn’t configured to do anything else)

Next time, please fill out the help topic template. It’s important to save time for both you and those helping you.

2 Likes

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