Caddy V2 health check with php_fastcgi not working

Hello Caddy community,

My Caddyfile (v2.7.6 ) :

domain_name{
root * /var/www/html

tls {
dns cloudflare {API_Key}
}

file_server

php_fastcgi 172.25.55.102:9001 172.25.55.102:9002 172.25.55.102:9003 172.25.55.102:9004 {
root /var/www/html
index index.php
env {env}
lb_policy round_robin
health_uri /site/healthcheck
}

The error :

{“level”:“error”,“ts”:1705286319.2736409,“logger”:“http.handlers.reverse_proxy.health_checker.active”,“msg”:“active health check panicked”,“error”:“interface conversion: interface {} is nil, not string”,“stack”:"goroutine 82 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Handler).doActiveHealthCheckForAllHosts.func1.1()\n\tgithub.com/caddyserver/caddy/v2@v2.7.6/modules/caddyhttp/reverseproxy/healthchecks.go:250 +0xd7\npanic({0x177e500?, 0xc0005ecbd0?})

How to fix ?

1 Like

Ah, interesting. That’s a bug. I see the problem, I’ll have a fix soon.

1 Like
1 Like

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