Do you have a working version without the chroot in php-fpm?
You should start by that.
Then as soon as you define a chroot in the pool:
chroot = /opt/jail/example/home/example
You will have to remove this path from other settings ein this pool:
listen
chdir
- php settings, like
php_admin_value[open_basedir]
orphp_value[include_path]
orphp_admin_value[upload_tmp_dir]
and all settings working with tmp directory.
Some others seems to ignore the chroot like slowlog
.
So you have a listen = /var/run/php_fpm_example.sock
, it means /opt/jail/example/home/example/var/run/php_fpm_example.sock
and this should be the path for apache FastCGIExternalServer
.
Configuration of Apache with a chrooted php-fpm and FastCGIExternalServer is quite hard, I once described it with a fake full directory path symlink inside the chroot (ugly), but with the new Apache 2.4 you should try to use mod_proxy_fcgi instead or replace Apache by Nginx.