Hugo,
Would you mind giving me an exampe?
At the moment I use Hiawatha in a FreeBSD jail..
In the jail, I create 1 user per domain with sftp access only (no shell)...
I then create
mkdir /home/fred/public_html
I then create vi /usr/local/etc/php-fpm.d/fred.conf with the following
[fred]
user = fred
group = www
listen = /var/run/fred.sock
listen.owner = fred
listen.group = www
listen.mode = 0660
pm = ondemand
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.process_idle_timeout = 60s;
pm.max_requests = 200
pm.status_path = /status
request_terminate_timeout = 0
env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /home/fred/tmp
env[TMPDIR] = /home/fred/tmp
env[TEMP] = /home/fred/tmp
php_admin_value[open_basedir] = /home/fred/public_html:/home/fred/tmp:/usr/local/share/pear:/usr/local/php70/lib/php
php_admin_value[disable_functions] = "exec,passthru,shell_exec,system,proc_open,popen,show_source"
php_admin_value[date.timezone] = Europe/London
php_flag[display_errors] = off
php_admin_flag[log_errors] = on
php_admin_value[error_reporting] = 30711
php_admin_value[error_log] = /var/log/php-fpm/fred.error.log
php_admin_value[memory_limit] = 128M
php_admin_value[upload_tmp_dir] = /home/fred/tmp
php_admin_value[session.save_path] = /home/fred/tmp
and finally add it to hiawatha.conf
FastCGIserver {
FastCGIid = PHP7-FPM-FRED
ConnectTo = /var/run/fred.sock
Extension = php
}
So if I understand, I can cut all the steps above by only doing that 1 line of code?:
Wrap = jail_mydomain.co.uk ; /home/fred/public_html ; fred:www
where /home/fred/public_html will be in chroot and permision fred:www..
Is that correct? can i remove the
FastCGIserver {
FastCGIid = PHP7-FPM-FRED
ConnectTo = /var/run/fred.sock
Extension = php
}
from hiawatha.conf with the above?
Thank you