coolify: [Bug]: Ghost one-click deploy `SSL_PROTOCOL_ERROR` with Caddy

Error Message and Logs

Am currently at v4.0.0-beta.370. Instead of a 404, I’m getting a (failed) net::ERR_SSL_PROTOCOL_ERROR when using Ghost one-click deploy.

Note: I’m using Caddy instead of Traefik`.

I verified SERVICE_FQDN_GHOST_2368 points to my domain at https://blog.scottsus.dev, and url points to $SERVICE_FQDN_GHOST_2368. Both Ghost and Mysql running and healthy.

Any suggestions?

Steps to Reproduce

  1. New resource
  2. Production
  3. Ghost
  4. Change service name to ghost-cms
  5. Services -> settings -> https://blog.scottsus.dev:2368
  6. Verify SERVICE_FQDN_GHOST_2368 -> https://blog.scottsus.dev
  7. Browser visit https://blog.scottsus.dev
  8. (failed) net::ERR_SSL_PROTOCOL_ERROR.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.370

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04.1 LTS

Additional Information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Ok that issue is now fixed and I was able to deploy and also get an SSL error.

Ghost docker logs look normal, proxy logs don’t.

Proxy logs:

2024-12-15T09:15:06.297320740Z {"level":"info","ts":1734254106.2971842,"logger":"docker-proxy","msg":"Process Caddyfile","logs":"[ERROR]  Removing invalid block: parsing caddyfile tokens for 'handle_path': unrecognized directive: redir-ghost-zok8080w404cg0400s00gosw - are you sure your Caddyfile structure (nesting and braces) is correct?, at Caddyfile:37\nhttps://test.tchin.io {\n\tencode zstd gzip\n\thandle_path /* {\n\t\tredir-ghost-zok8080w404cg0400s00gosw {\n\t\t\thandler rewrite\n\t\t\trewrite {\n\t\t\t\tregexp ^//(.*)\n\t\t\t\treplacement /$1\n\t\t\t}\n\t\t}\n\t\treverse_proxy 172.23.0.3:2368\n\t}\n\theader -Server\n\ttry_files {path} /index.html /index.php\n}\n\n"}

@subflow

I can see you have the same issue I had. Feel free to check my last solution: https://github.com/coollabsio/coolify/issues/4809#issuecomment-2605858583

Feel free to let me know if this worked. I already did that a few times and besides that, I may found some issues and hope Coolify devs will look at it and try to check, clarify some stuff, and maybe fi itx.

This is maybe another issue, but i did what @olamide-olaniyan suggested and ot works to reach the site. I have tried several times to do fresh install of ghost but i get this error:

Image

Anyone else having this issue?

Here is how I solved this.

  1. Click on Servers to the left

Image

  1. Then click on localhost or wherever Coolify runs.

  2. The click on Proxy, the click on Dynamic Configurations Image

  3. Then click on Add, and it will show a popup that looks like this. Add a new caddy file called “anything.caddy”, I called mine blog.caddy The in the content, add the code below, as seen in the screenshot below, don’t forget to update your blog url

https://blog.example.com {
    handle_path /* {
        rewrite * /{http.request.uri.path}
        reverse_proxy 10.0.7.3:2368
    }
    header -Server
    try_files {path} /index.html /index.php
}

Image

  1. Then save.
{
  "level": "info",
  "ts": 1735930777.4430623,
  "logger": "docker-proxy",
  "msg": "Process Caddyfile",
  "logs": "[ERROR]  Removing invalid block: parsing caddyfile tokens for 'handle_path': unrecognized directive: redir-ghost-m08s00s8w88ss4s044skkw4o - are you sure your Caddyfile structure (nesting and braces) is correct?, at Caddyfile:29
https://ghost-m08s00s8w88ss4s044skkw4o.scottsus.dev {
    encode zstd gzip
    handle_path /* {
        redir-ghost-m08s00s8w88ss4s044skkw4o {
            handler rewrite
            rewrite {
                regexp ^//(.*)
                replacement /$1
            }
        }
        reverse_proxy 10.0.4.3:2368
    }
    header -Server
    try_files {path} /index.html /index.php"
}

I got the exact same proxy logs (here’s a prettified version).