From 89ba0d1b54b0e2b883905ca0a0dfbde115087776 Mon Sep 17 00:00:00 2001 From: Sroka Date: Sun, 28 Jan 2018 14:38:36 +0100 Subject: [PATCH] php-fpm chroot support --- .../sql/incremental/upd_dev_collection.sql | 1 + install/sql/ispconfig3.sql | 1 + .../web/sites/form/web_vhost_domain.tform.php | 6 ++++++ .../sites/lib/lang/en_web_vhost_domain.lng | 1 + .../templates/web_vhost_domain_advanced.htm | 6 ++++++ server/conf/nginx_vhost.conf.master | 4 ++++ server/conf/php_fpm_pool.conf.master | 18 ++++++++++++++++ server/plugins-available/nginx_plugin.inc.php | 21 ++++++++++++++++++- 8 files changed, 57 insertions(+), 1 deletion(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index f73a20b057..b863071700 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -1,3 +1,4 @@ ALTER TABLE `web_domain` ADD COLUMN `ssl_letsencrypt_exclude` enum('n','y') NOT NULL DEFAULT 'n' AFTER `ssl_letsencrypt`; ALTER TABLE `remote_user` ADD `remote_access` ENUM('y','n') NOT NULL DEFAULT 'y' AFTER `remote_password`; ALTER TABLE `remote_user` ADD `remote_ips` TEXT AFTER `remote_access`; +ALTER TABLE `web_domain` ADD `php_fpm_chroot` enum('n','y') NOT NULL DEFAULT 'n' AFTER `php_fpm_use_socket`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 9aa91701bc..75b4659bbe 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1963,6 +1963,7 @@ CREATE TABLE `web_domain` ( `apache_directives` mediumtext, `nginx_directives` mediumtext, `php_fpm_use_socket` ENUM('n','y') NOT NULL DEFAULT 'y', + `php_fpm_chroot` ENUM('n','y') NOT NULL DEFAULT 'n', `pm` enum('static','dynamic','ondemand') NOT NULL DEFAULT 'dynamic', `pm_max_children` int(11) NOT NULL DEFAULT '10', `pm_start_servers` int(11) NOT NULL DEFAULT '2', diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index 11132f5469..f230226ef8 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -766,6 +766,12 @@ if($_SESSION["s"]["user"]["typ"] == 'admin' 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') ), + 'php_fpm_chroot' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), 'pm' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 06a2197516..f7ad65de41 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -29,6 +29,7 @@ $wb['vhost_type_txt'] = 'VHost Type'; $wb['hd_quota_txt'] = 'Harddisk Quota'; $wb['traffic_quota_txt'] = 'Traffic Quota'; $wb['cgi_txt'] = 'CGI'; +$wb['php_fpm_chroot_txt'] = 'PHP-FPM Chroot'; $wb['ssi_txt'] = 'SSI'; $wb['errordocs_txt'] = 'Own Error-Documents'; $wb['subdomain_txt'] = 'Auto-Subdomain'; diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm index 7ca4710f40..2a19659d35 100644 --- a/interface/web/sites/templates/web_vhost_domain_advanced.htm +++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm @@ -57,6 +57,12 @@ {tmpl_var name='php_fpm_use_socket'} +
+ +
+ {tmpl_var name='php_fpm_chroot'} +
+