Reverse Proxy Unavailable

1. Caddy version (caddy version):

Caddy Version: 2 + Cloudflare Plugin

2. How I run Caddy:

a. System environment:


b. Command:

docker-compose up -d

c. Service/unit/compose file:

version: "3.7"

    build: .
    restart: unless-stopped
      - "4443:443/tcp"
      - ./caddyfile:/etc/caddy/Caddyfile

d. My complete Caddyfile or JSON config:

	acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}
	auto_https disable_redirects
	https_port 443
} {
        handle_errors {
	      respond "{http.error.status_code} Service unavailable."
} {
	reverse_proxy {
                transport http {

3. The problem I’m having:

Hello guys,

I have a question. I have a lot of reverse proxy entries. Something I would like is to provide a webpage or at least a message if a reverse proxy origin is unavailable.

4. Error messages and/or full log output:

As described at the next topic, the supposed solution did not work.

5. What I already tried:

I went searching and found handle_errors assuming that unavailability would provide an error code.

6. Links to relevant resources:

What do you mean “did not work”? What behaviour did you see instead?

Please make sure to persist /data and /config as volumes, as described in the docs on Docker Hub. It’s necessary to persist the certs and keys you’ve had issued from ACME CAs, and to persist important state that Caddy writes to disk.

How are you building Caddy exactly? What does your Dockerfile look like?

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