diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index b69912befabeb67e5ad124eaccbe5bface2cf3d5..7e6fc23790ab38c31f1dd2f727a86218a8688332 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1459,9 +1459,18 @@ class installer_base {
$content = str_replace('{apps_vhost_port}', $conf['web']['apps_vhost_port'], $content);
$content = str_replace('{apps_vhost_dir}', $conf['web']['website_basedir'].'/apps', $content);
$content = str_replace('{apps_vhost_servername}', $apps_vhost_servername, $content);
- $content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content);
+ $content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
wf($vhost_conf_dir.'/apps.vhost', $content);
+
+ // PHP-FPM
+ // Dont just copy over the php-fpm pool template but add some custom settings
+ $content = rf('tpl/php_fpm_pool.conf.master');
+ $content = str_replace('{fpm_pool}', 'apps', $content);
+ $content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
+ $content = str_replace('{fpm_user}', $apps_vhost_user, $content);
+ $content = str_replace('{fpm_group}', $apps_vhost_group, $content);
+ wf($conf['nginx']['php_fpm_pool_dir'].'/apps.conf', $content);
//copy('tpl/nginx_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
//* and create the symlink
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm
index a7d1026a005f38da140504cc21dd51c2dbe52c37..4b85025f51f9a0958adade1e317fe8cda49d9dc9 100644
--- a/interface/web/admin/templates/server_config_web_edit.htm
+++ b/interface/web/admin/templates/server_config_web_edit.htm
@@ -8,7 +8,7 @@
{tmpl_var name='server_type_txt'}
-
@@ -55,7 +55,7 @@
-
+
{tmpl_var name='security_level_txt'}
@@ -162,6 +162,7 @@
\ No newline at end of file
diff --git a/server/conf/php_fpm_pool.conf.master b/server/conf/php_fpm_pool.conf.master
index 73ebffb6a104c21301f177b9efd3702192d1a529..1b0a21a590722552b9d4591381ccec7a4913d59d 100644
--- a/server/conf/php_fpm_pool.conf.master
+++ b/server/conf/php_fpm_pool.conf.master
@@ -13,7 +13,11 @@ pm.max_spare_servers = 35
chdir = /
+
+
php_admin_value[open_basedir] =
+
+
\ No newline at end of file
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 0b31c6df885daf48a6d0d60d50cad1f4f7630230..d57469c515d6bb4b5f6b16704158de6fd8ae4bd1 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -638,12 +638,10 @@ class nginx_plugin {
$vhost_data['web_document_root'] = $data['new']['document_root'].'/web';
$vhost_data['web_document_root_www'] = $web_config['website_basedir'].'/'.$data['new']['domain'].'/web';
$vhost_data['web_basedir'] = $web_config['website_basedir'];
- $vhost_data['security_level'] = $web_config['security_level'];
- $vhost_data['allow_override'] = ($data['new']['allow_override'] == '')?'All':$data['new']['allow_override'];
$vhost_data['ssl_domain'] = $data['new']['ssl_domain'];
//$vhost_data['has_custom_php_ini'] = $has_custom_php_ini;
//$vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir);
- $vhost_data['fpm_port'] = $web_config['php_fpm_start_port'] + $data['new']['domain_id'];
+ $vhost_data['fpm_port'] = $web_config['php_fpm_start_port'] + $data['new']['domain_id'] + 1;
// Check if a SSL cert exists
$ssl_dir = $data['new']['document_root'].'/ssl';
@@ -1098,9 +1096,10 @@ class nginx_plugin {
$tpl->newTemplate('php_fpm_pool.conf.master');
$tpl->setVar('fpm_pool', $data['new']['domain']);
- $tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id']);
+ $tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id'] + 1);
$tpl->setVar('fpm_user', $data['new']['system_user']);
$tpl->setVar('fpm_group', $data['new']['system_group']);
+ $tpl->setVar('security_level',$web_config['security_level']);
$php_open_basedir = ($data['new']['php_open_basedir'] == '')?escapeshellcmd($data['new']['document_root']):escapeshellcmd($data['new']['php_open_basedir']);
$tpl->setVar('php_open_basedir', $php_open_basedir);
if($php_open_basedir != ''){