• 0 Posts
  • 1 Comment
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • I’ve only used Caddy as a reverse proxy in production, but on my development machine I use Caddy with php-fpm. That makes me a bit unsure if I understand your questions correctly.

    For me that would look something like this:

    test.example.com {
    	root * var/www/html
    	php_fastcgi unix//run/php/php7.4-fpm.sock
    	file_server
    }
    

    (Yeah, PHP 7.4, I know)

    It looks like your Docker (?) image is exposing the php-fmp socket? I did not even know that was possible, but I don’t doubt it is.

    Caddy has no issues serving multiple hosts from the same server, it can even be with different php-fpm sockets. Caddy will just nod at you, maybe silently question your choice of still running PHP 7.4, but it accepts it and runs. Just make another block with a different host in the same Caddyfile, and it will work just fine.