fix read in correct fpm-daemon config-id for nginx and lighttpd own-vhost, thx again to heavygale
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -294,7 +294,7 @@ class apache extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
$this->virtualhosts_data[$vhosts_filename] .= ' </Directory>' . "\n";
|
$this->virtualhosts_data[$vhosts_filename] .= ' </Directory>' . "\n";
|
||||||
}
|
}
|
||||||
} elseif (Settings::Get('phpfpm.enabled') == '1') {
|
} elseif (Settings::Get('phpfpm.enabled') == '1' && (int) Settings::Get('phpfpm.enabled_ownvhost') == 1) {
|
||||||
// get fpm config
|
// get fpm config
|
||||||
$fpm_sel_stmt = Database::prepare("
|
$fpm_sel_stmt = Database::prepare("
|
||||||
SELECT f.id FROM `" . TABLE_PANEL_FPMDAEMONS . "` f
|
SELECT f.id FROM `" . TABLE_PANEL_FPMDAEMONS . "` f
|
||||||
|
|||||||
@@ -151,7 +151,16 @@ class lighttpd extends HttpConfigBase
|
|||||||
/**
|
/**
|
||||||
* own php-fpm vhost
|
* own php-fpm vhost
|
||||||
*/
|
*/
|
||||||
if ((int) Settings::Get('phpfpm.enabled') == 1) {
|
if ((int) Settings::Get('phpfpm.enabled') == 1 && (int) Settings::Get('phpfpm.enabled_ownvhost') == 1) {
|
||||||
|
// get fpm config
|
||||||
|
$fpm_sel_stmt = Database::prepare("
|
||||||
|
SELECT f.id FROM `" . TABLE_PANEL_FPMDAEMONS . "` f
|
||||||
|
LEFT JOIN `" . TABLE_PANEL_PHPCONFIGS . "` p ON p.fpmsettingid = f.id
|
||||||
|
WHERE p.id = :phpconfigid
|
||||||
|
");
|
||||||
|
$fpm_config = Database::pexecute_first($fpm_sel_stmt, array(
|
||||||
|
'phpconfigid' => Settings::Get('phpfpm.vhost_defaultini')
|
||||||
|
));
|
||||||
$domain = array(
|
$domain = array(
|
||||||
'id' => 'none',
|
'id' => 'none',
|
||||||
'domain' => Settings::Get('system.hostname'),
|
'domain' => Settings::Get('system.hostname'),
|
||||||
@@ -163,7 +172,8 @@ class lighttpd extends HttpConfigBase
|
|||||||
'email' => Settings::Get('panel.adminmail'),
|
'email' => Settings::Get('panel.adminmail'),
|
||||||
'loginname' => 'froxlor.panel',
|
'loginname' => 'froxlor.panel',
|
||||||
'documentroot' => $mypath,
|
'documentroot' => $mypath,
|
||||||
'customerroot' => $mypath
|
'customerroot' => $mypath,
|
||||||
|
'fpm_config_id' => isset($fpm_config['id']) ? $fpm_config['id'] : 1
|
||||||
);
|
);
|
||||||
|
|
||||||
$php = new phpinterface($domain);
|
$php = new phpinterface($domain);
|
||||||
|
|||||||
@@ -282,6 +282,15 @@ class nginx extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((int) Settings::Get('phpfpm.enabled') == 1 && (int) Settings::Get('phpfpm.enabled_ownvhost') == 1) {
|
if ((int) Settings::Get('phpfpm.enabled') == 1 && (int) Settings::Get('phpfpm.enabled_ownvhost') == 1) {
|
||||||
|
// get fpm config
|
||||||
|
$fpm_sel_stmt = Database::prepare("
|
||||||
|
SELECT f.id FROM `" . TABLE_PANEL_FPMDAEMONS . "` f
|
||||||
|
LEFT JOIN `" . TABLE_PANEL_PHPCONFIGS . "` p ON p.fpmsettingid = f.id
|
||||||
|
WHERE p.id = :phpconfigid
|
||||||
|
");
|
||||||
|
$fpm_config = Database::pexecute_first($fpm_sel_stmt, array(
|
||||||
|
'phpconfigid' => Settings::Get('phpfpm.vhost_defaultini')
|
||||||
|
));
|
||||||
$domain = array(
|
$domain = array(
|
||||||
'id' => 'none',
|
'id' => 'none',
|
||||||
'domain' => Settings::Get('system.hostname'),
|
'domain' => Settings::Get('system.hostname'),
|
||||||
@@ -293,7 +302,8 @@ class nginx extends HttpConfigBase
|
|||||||
'email' => Settings::Get('panel.adminmail'),
|
'email' => Settings::Get('panel.adminmail'),
|
||||||
'loginname' => 'froxlor.panel',
|
'loginname' => 'froxlor.panel',
|
||||||
'documentroot' => $mypath,
|
'documentroot' => $mypath,
|
||||||
'customerroot' => $mypath
|
'customerroot' => $mypath,
|
||||||
|
'fpm_config_id' => isset($fpm_config['id']) ? $fpm_config['id'] : 1
|
||||||
);
|
);
|
||||||
|
|
||||||
$php = new phpinterface($domain);
|
$php = new phpinterface($domain);
|
||||||
|
|||||||
Reference in New Issue
Block a user