Caddy2 php-fpm through socket

1. My Caddy version (caddy version): v2.0.0-beta.15

2. How I run Caddy:

a. System environment:

Ubuntu 18.04

b. Command:

 ./caddy run --config /root/downloads/Caddyfile --adapter caddyfile

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile or JSON config: {
  root * /home/roman/testw
  php_fastcgi unix//var/run/php/php7.2-fpm.sock

3. The problem I’m having:

PHP does not work as it seems to be not supporting sockets as of now

4. Error messages and/or full log output:

2020/03/05 17:31:06.033 INFO    using provided configuration    {"config_file": "/root/downloads/Caddyfile", "config_adapter": "caddyfile"}
run: adapting config using caddyfile: parsing caddyfile tokens for 'php_fastcgi': /root/downloads/Caddyfile:3 - Error during parsing: for now, URLs for proxy upstreams only support scheme, host, and port components

5. What I already tried:

Google and found and answer that the above syntax would work (unux//var…)

6. Links to relevant resources:

Question: While i understand from the error message, still asking… is there is a way to run php through socket? Or it would be better to reconfigure php-fpm to use tcp and address?

Welcome, and thanks for using Caddy 2 while it’s still in beta!

This is a known bug, as described in the release notes: Release 2.0 beta 15 · caddyserver/caddy · GitHub

Fixed here: reverse_proxy, php_fastcgi: Fix upstream parsing regression (fix #3101) · caddyserver/caddy@c83d40c · GitHub

To add onto that, if you need a binary that has the fix, you can grab the build artifact from CI here: (temporarily until beta16 comes out)


Thank you for the prompt reply. I should read more carefully next time :slight_smile:

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