I'm running Debian Jessie with Apache 2.4.10. I have been through the "File not found" problem, and ended up referencing this question. The only difference between my setup and his is that I would REALLY (for various reasons) prefer to use UDS instead of TCP sockets, and using the ProxyPassMatch solution isn't quite doing the trick, though I'm not sure why.
Here is my line in the config:
ProxyPassMatch "^/(.*\.php)$" "unix:/var/run/myappname.sock|fcgi://localhost/webroot/$1"
And here is the debug output:
AH00944: connecting fcgi://localhost/webroot/index.php to localhost:8000, referer: http://myapp.com
AH00947: connected /webroot/index.php to localhost:8000, referer: http://myapp.com
(111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:8000 (*) failed
If I try to use an address other than eg. localhost
I get a DNS failure, however when using SetHandler
, I am able to use an arbitrary string as the address successfully. I don't understand the difference. Here is a working example (without chroot
) using SetHandler
and FilesMatch
instead of ProxyPassMatch
.
<FilesMatch "\.php$">
SetHandler "proxy:unix:/var/run/myappname.sock|fcgi://myappname/"
</FilesMatch>