Merge branch 'master' into feature/letsencrypt-verbesserungen
This commit is contained in:
@@ -49,7 +49,36 @@ return array(
|
|||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'visible' => Settings::Get('system.leenabled')
|
'visible' => Settings::Get('system.use_ssl')
|
||||||
|
),
|
||||||
|
'system_hsts_maxage' => array(
|
||||||
|
'label' => $lng['admin']['domain_hsts_maxage'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'hsts_maxage',
|
||||||
|
'type' => 'int',
|
||||||
|
'int_min' => 0,
|
||||||
|
'int_max' => 94608000, // 3-years
|
||||||
|
'default' => 0,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
'visible' => Settings::Get('system.use_ssl')
|
||||||
|
),
|
||||||
|
'system_hsts_incsub' => array(
|
||||||
|
'label' => $lng['admin']['domain_hsts_incsub'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'hsts_incsub',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
'visible' => Settings::Get('system.use_ssl')
|
||||||
|
),
|
||||||
|
'system_hsts_preload' => array(
|
||||||
|
'label' => $lng['admin']['domain_hsts_preload'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'hsts_preload',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
'visible' => Settings::Get('system.use_ssl')
|
||||||
),
|
),
|
||||||
/**
|
/**
|
||||||
* FCGID
|
* FCGID
|
||||||
|
|||||||
@@ -153,33 +153,7 @@ return array(
|
|||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField'
|
'save_method' => 'storeSettingField'
|
||||||
),
|
)
|
||||||
'system_hsts_maxage' => array(
|
|
||||||
'label' => $lng['admin']['domain_hsts_maxage'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'hsts_maxage',
|
|
||||||
'type' => 'int',
|
|
||||||
'int_min' => 0,
|
|
||||||
'int_max' => 94608000, // 3-years
|
|
||||||
'default' => 0,
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
'system_hsts_incsub' => array(
|
|
||||||
'label' => $lng['admin']['domain_hsts_incsub'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'hsts_incsub',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
'system_hsts_preload' => array(
|
|
||||||
'label' => $lng['admin']['domain_hsts_preload'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'hsts_preload',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
|
|
||||||
if ($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') {
|
if ($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') {
|
||||||
|
|
||||||
|
$phpenabled = isset($POST_['phpenabled']) ? intval($_POST['phpenabled']) : 0;
|
||||||
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
|
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
|
||||||
|
|
||||||
if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) {
|
if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) {
|
||||||
@@ -495,7 +496,9 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
$phpenabled = '1';
|
||||||
$openbasedir = '1';
|
$openbasedir = '1';
|
||||||
|
|
||||||
if ((int) Settings::Get('phpfpm.enabled') == 1) {
|
if ((int) Settings::Get('phpfpm.enabled') == 1) {
|
||||||
$phpsettingid = Settings::Get('phpfpm.defaultini');
|
$phpsettingid = Settings::Get('phpfpm.defaultini');
|
||||||
} else {
|
} else {
|
||||||
@@ -691,6 +694,10 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
standard_error('noipportgiven');
|
standard_error('noipportgiven');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($phpenabled != '1') {
|
||||||
|
$phpenabled = '0';
|
||||||
|
}
|
||||||
|
|
||||||
if ($openbasedir != '1') {
|
if ($openbasedir != '1') {
|
||||||
$openbasedir = '0';
|
$openbasedir = '0';
|
||||||
}
|
}
|
||||||
@@ -770,6 +777,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
'ipandport' => serialize($ipandports),
|
'ipandport' => serialize($ipandports),
|
||||||
'ssl_redirect' => $ssl_redirect,
|
'ssl_redirect' => $ssl_redirect,
|
||||||
'ssl_ipandport' => serialize($ssl_ipandports),
|
'ssl_ipandport' => serialize($ssl_ipandports),
|
||||||
|
'phpenabled' => $phpenabled,
|
||||||
'openbasedir' => $openbasedir,
|
'openbasedir' => $openbasedir,
|
||||||
'phpsettingid' => $phpsettingid,
|
'phpsettingid' => $phpsettingid,
|
||||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||||
@@ -818,6 +826,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
'email_only' => $email_only,
|
'email_only' => $email_only,
|
||||||
'subcanemaildomain' => $subcanemaildomain,
|
'subcanemaildomain' => $subcanemaildomain,
|
||||||
'caneditdomain' => $caneditdomain,
|
'caneditdomain' => $caneditdomain,
|
||||||
|
'phpenabled' => $phpenabled,
|
||||||
'openbasedir' => $openbasedir,
|
'openbasedir' => $openbasedir,
|
||||||
'speciallogfile' => $speciallogfile,
|
'speciallogfile' => $speciallogfile,
|
||||||
'specialsettings' => $specialsettings,
|
'specialsettings' => $specialsettings,
|
||||||
@@ -854,6 +863,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
`email_only` = :email_only,
|
`email_only` = :email_only,
|
||||||
`subcanemaildomain` = :subcanemaildomain,
|
`subcanemaildomain` = :subcanemaildomain,
|
||||||
`caneditdomain` = :caneditdomain,
|
`caneditdomain` = :caneditdomain,
|
||||||
|
`phpenabled` = :phpenabled,
|
||||||
`openbasedir` = :openbasedir,
|
`openbasedir` = :openbasedir,
|
||||||
`speciallogfile` = :speciallogfile,
|
`speciallogfile` = :speciallogfile,
|
||||||
`specialsettings` = :specialsettings,
|
`specialsettings` = :specialsettings,
|
||||||
@@ -1328,6 +1338,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
|
|
||||||
if ($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') {
|
if ($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') {
|
||||||
|
|
||||||
|
$phpenabled = isset($_POST['phpenabled']) ? intval($_POST['phpenabled']) : 0;
|
||||||
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
|
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
|
||||||
|
|
||||||
if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) {
|
if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) {
|
||||||
@@ -1362,6 +1373,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
$mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests'];
|
$mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$phpenabled = $result['phpenabled'];
|
||||||
$openbasedir = $result['openbasedir'];
|
$openbasedir = $result['openbasedir'];
|
||||||
$phpsettingid = $result['phpsettingid'];
|
$phpsettingid = $result['phpsettingid'];
|
||||||
$mod_fcgid_starter = $result['mod_fcgid_starter'];
|
$mod_fcgid_starter = $result['mod_fcgid_starter'];
|
||||||
@@ -1474,6 +1486,10 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
$documentroot = makeCorrectDir($documentroot);
|
$documentroot = makeCorrectDir($documentroot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($phpenabled != '1') {
|
||||||
|
$phpenabled = '0';
|
||||||
|
}
|
||||||
|
|
||||||
if ($openbasedir != '1') {
|
if ($openbasedir != '1') {
|
||||||
$openbasedir = '0';
|
$openbasedir = '0';
|
||||||
}
|
}
|
||||||
@@ -1582,6 +1598,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
'dkim' => $dkim,
|
'dkim' => $dkim,
|
||||||
'selectserveralias' => $serveraliasoption,
|
'selectserveralias' => $serveraliasoption,
|
||||||
'ssl_redirect' => $ssl_redirect,
|
'ssl_redirect' => $ssl_redirect,
|
||||||
|
'phpenabled' => $phpenabled,
|
||||||
'openbasedir' => $openbasedir,
|
'openbasedir' => $openbasedir,
|
||||||
'phpsettingid' => $phpsettingid,
|
'phpsettingid' => $phpsettingid,
|
||||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||||
@@ -1617,7 +1634,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
|
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
|
||||||
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
|
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
|
||||||
|
|
||||||
if ($documentroot != $result['documentroot'] || $ssl_redirect != $result['ssl_redirect'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $openbasedir != $result['openbasedir'] || $phpsettingid != $result['phpsettingid'] || $mod_fcgid_starter != $result['mod_fcgid_starter'] || $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] || $specialsettings != $result['specialsettings'] || $aliasdomain != $result['aliasdomain'] || $issubof != $result['ismainbutsubto'] || $email_only != $result['email_only'] || ($speciallogfile != $result['speciallogfile'] && $speciallogverified == '1') || $letsencrypt != $result['letsencrypt'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload']) {
|
if ($documentroot != $result['documentroot'] || $ssl_redirect != $result['ssl_redirect'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $phpenabled != $result['phpenabled'] || $openbasedir != $result['openbasedir'] || $phpsettingid != $result['phpsettingid'] || $mod_fcgid_starter != $result['mod_fcgid_starter'] || $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] || $specialsettings != $result['specialsettings'] || $aliasdomain != $result['aliasdomain'] || $issubof != $result['ismainbutsubto'] || $email_only != $result['email_only'] || ($speciallogfile != $result['speciallogfile'] && $speciallogverified == '1') || $letsencrypt != $result['letsencrypt'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload']) {
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1758,6 +1775,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
$update_data['zonefile'] = $zonefile;
|
$update_data['zonefile'] = $zonefile;
|
||||||
$update_data['wwwserveralias'] = $wwwserveralias;
|
$update_data['wwwserveralias'] = $wwwserveralias;
|
||||||
$update_data['iswildcarddomain'] = $iswildcarddomain;
|
$update_data['iswildcarddomain'] = $iswildcarddomain;
|
||||||
|
$update_data['phpenabled'] = $phpenabled;
|
||||||
$update_data['openbasedir'] = $openbasedir;
|
$update_data['openbasedir'] = $openbasedir;
|
||||||
$update_data['speciallogfile'] = $speciallogfile;
|
$update_data['speciallogfile'] = $speciallogfile;
|
||||||
$update_data['phpsettingid'] = $phpsettingid;
|
$update_data['phpsettingid'] = $phpsettingid;
|
||||||
@@ -1789,6 +1807,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
`zonefile` = :zonefile,
|
`zonefile` = :zonefile,
|
||||||
`wwwserveralias` = :wwwserveralias,
|
`wwwserveralias` = :wwwserveralias,
|
||||||
`iswildcarddomain` = :iswildcarddomain,
|
`iswildcarddomain` = :iswildcarddomain,
|
||||||
|
`phpenabled` = :phpenabled,
|
||||||
`openbasedir` = :openbasedir,
|
`openbasedir` = :openbasedir,
|
||||||
`speciallogfile` = :speciallogfile,
|
`speciallogfile` = :speciallogfile,
|
||||||
`phpsettingid` = :phpsettingid,
|
`phpsettingid` = :phpsettingid,
|
||||||
@@ -1808,6 +1827,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
|
|
||||||
$_update_data['customerid'] = $customerid;
|
$_update_data['customerid'] = $customerid;
|
||||||
$_update_data['adminid'] = $adminid;
|
$_update_data['adminid'] = $adminid;
|
||||||
|
$_update_data['phpenabled'] = $phpenabled;
|
||||||
$_update_data['openbasedir'] = $openbasedir;
|
$_update_data['openbasedir'] = $openbasedir;
|
||||||
$_update_data['phpsettingid'] = $phpsettingid;
|
$_update_data['phpsettingid'] = $phpsettingid;
|
||||||
$_update_data['mod_fcgid_starter'] = $mod_fcgid_starter;
|
$_update_data['mod_fcgid_starter'] = $mod_fcgid_starter;
|
||||||
@@ -1826,6 +1846,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
||||||
`customerid` = :customerid,
|
`customerid` = :customerid,
|
||||||
`adminid` = :adminid,
|
`adminid` = :adminid,
|
||||||
|
`phpenabled` = :phpenabled,
|
||||||
`openbasedir` = :openbasedir,
|
`openbasedir` = :openbasedir,
|
||||||
`phpsettingid` = :phpsettingid,
|
`phpsettingid` = :phpsettingid,
|
||||||
`mod_fcgid_starter` = :mod_fcgid_starter,
|
`mod_fcgid_starter` = :mod_fcgid_starter,
|
||||||
|
|||||||
@@ -517,7 +517,12 @@ if ($page == 'overview') {
|
|||||||
|
|
||||||
// check if we at least have one ssl-ip/port, #1179
|
// check if we at least have one ssl-ip/port, #1179
|
||||||
$ssl_ipsandports = '';
|
$ssl_ipsandports = '';
|
||||||
$ssl_ip_stmt = Database::prepare("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
|
$ssl_ip_stmt = Database::prepare("
|
||||||
|
SELECT COUNT(*) as countSSL
|
||||||
|
FROM `".TABLE_PANEL_IPSANDPORTS."` pip
|
||||||
|
LEFT JOIN `".TABLE_DOMAINTOIP."` dti ON dti.id_ipandports = pip.id
|
||||||
|
WHERE pip.`ssl`='1'
|
||||||
|
");
|
||||||
Database::pexecute($ssl_ip_stmt);
|
Database::pexecute($ssl_ip_stmt);
|
||||||
$resultX = $ssl_ip_stmt->fetch(PDO::FETCH_ASSOC);
|
$resultX = $ssl_ip_stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
|
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
|
||||||
@@ -797,8 +802,13 @@ if ($page == 'overview') {
|
|||||||
|
|
||||||
// check if we at least have one ssl-ip/port, #1179
|
// check if we at least have one ssl-ip/port, #1179
|
||||||
$ssl_ipsandports = '';
|
$ssl_ipsandports = '';
|
||||||
$ssl_ip_stmt = Database::prepare("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
|
$ssl_ip_stmt = Database::prepare("
|
||||||
Database::pexecute($ssl_ip_stmt);
|
SELECT COUNT(*) as countSSL
|
||||||
|
FROM `".TABLE_PANEL_IPSANDPORTS."` pip
|
||||||
|
LEFT JOIN `".TABLE_DOMAINTOIP."` dti ON dti.id_ipandports = pip.id
|
||||||
|
WHERE `dti`.`id_domain` = :id_domain AND pip.`ssl`='1'
|
||||||
|
");
|
||||||
|
Database::pexecute($ssl_ip_stmt, array("id_domain" => $result['id']));
|
||||||
$resultX = $ssl_ip_stmt->fetch(PDO::FETCH_ASSOC);
|
$resultX = $ssl_ip_stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
|
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
|
||||||
$ssl_ipsandports = 'notempty';
|
$ssl_ipsandports = 'notempty';
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ CREATE TABLE `panel_domains` (
|
|||||||
`dkim_pubkey` text,
|
`dkim_pubkey` text,
|
||||||
`wwwserveralias` tinyint(1) NOT NULL default '1',
|
`wwwserveralias` tinyint(1) NOT NULL default '1',
|
||||||
`parentdomainid` int(11) NOT NULL default '0',
|
`parentdomainid` int(11) NOT NULL default '0',
|
||||||
|
`phpenabled` tinyint(1) NOT NULL default '0',
|
||||||
`openbasedir` tinyint(1) NOT NULL default '0',
|
`openbasedir` tinyint(1) NOT NULL default '0',
|
||||||
`openbasedir_path` tinyint(1) NOT NULL default '0',
|
`openbasedir_path` tinyint(1) NOT NULL default '0',
|
||||||
`speciallogfile` tinyint(1) NOT NULL default '0',
|
`speciallogfile` tinyint(1) NOT NULL default '0',
|
||||||
@@ -544,7 +545,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
|||||||
('system', 'mail_smtp_user', ''),
|
('system', 'mail_smtp_user', ''),
|
||||||
('system', 'mail_smtp_passwd', ''),
|
('system', 'mail_smtp_passwd', ''),
|
||||||
('system', 'hsts_maxage', '0'),
|
('system', 'hsts_maxage', '0'),
|
||||||
('system', 'hsts_sub', '0'),
|
('system', 'hsts_incsub', '0'),
|
||||||
('system', 'hsts_preload', '0'),
|
('system', 'hsts_preload', '0'),
|
||||||
('panel', 'decimal_places', '4'),
|
('panel', 'decimal_places', '4'),
|
||||||
('panel', 'adminmail', 'admin@SERVERNAME'),
|
('panel', 'adminmail', 'admin@SERVERNAME'),
|
||||||
@@ -577,8 +578,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
|||||||
('panel', 'password_special_char_required', '0'),
|
('panel', 'password_special_char_required', '0'),
|
||||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||||
('panel', 'customer_hide_options', ''),
|
('panel', 'customer_hide_options', ''),
|
||||||
('panel', 'version', '0.9.38.3'),
|
('panel', 'version', '0.9.38.4'),
|
||||||
('panel', 'db_version', '201611180');
|
('panel', 'db_version', '201612110');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_tasks`;
|
DROP TABLE IF EXISTS `panel_tasks`;
|
||||||
|
|||||||
@@ -3547,8 +3547,18 @@ if (isFroxlorVersion('0.9.38.2')) {
|
|||||||
updateToVersion('0.9.38.3');
|
updateToVersion('0.9.38.3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFroxlorVersion('0.9.38.3')) {
|
||||||
|
|
||||||
|
showUpdateStep("Updating from 0.9.38.3 to 0.9.38.4", false);
|
||||||
|
updateToVersion('0.9.38.4');
|
||||||
|
}
|
||||||
|
|
||||||
if (isDatabaseVersion('201611180')) {
|
if (isDatabaseVersion('201611180')) {
|
||||||
|
|
||||||
|
showUpdateStep("Updating database table definition for panel_domains");
|
||||||
|
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `phpenabled` tinyint(1) NOT NULL default '1' AFTER `parentdomainid`;");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
showUpdateStep("Adding field for let's-encrypt registration status");
|
showUpdateStep("Adding field for let's-encrypt registration status");
|
||||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` add `leregistered` TINYINT(1) NOT NULL DEFAULT 0;");
|
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` add `leregistered` TINYINT(1) NOT NULL DEFAULT 0;");
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
@@ -3557,5 +3567,5 @@ if (isDatabaseVersion('201611180')) {
|
|||||||
Settings::AddNew('system.leregistered', '0');
|
Settings::AddNew('system.leregistered', '0');
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
updateToDbVersion('201611241');
|
updateToDbVersion('201612110');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ class lescript
|
|||||||
$this->log("Token for $domain saved at $tokenPath and should be available at $uri");
|
$this->log("Token for $domain saved at $tokenPath and should be available at $uri");
|
||||||
|
|
||||||
// simple self check
|
// simple self check
|
||||||
$selfcheckContextOptions = array('http' => array('header' => "User Agent: Froxlor/".$this->version));
|
$selfcheckContextOptions = array('http' => array('header' => "User-Agent: Froxlor/".$this->version));
|
||||||
$selfcheckContext = stream_context_create($selfcheckContextOptions);
|
$selfcheckContext = stream_context_create($selfcheckContextOptions);
|
||||||
if ($payload !== trim(@file_get_contents($uri, false, $selfcheckContext))) {
|
if ($payload !== trim(@file_get_contents($uri, false, $selfcheckContext))) {
|
||||||
$errmsg = json_encode(error_get_last());
|
$errmsg = json_encode(error_get_last());
|
||||||
|
|||||||
@@ -31,8 +31,9 @@ class WebserverBase {
|
|||||||
$query = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`,
|
$query = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`,
|
||||||
`d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`,
|
`d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`,
|
||||||
`c`.`documentroot` AS `customerroot`, `c`.`deactivated`,
|
`c`.`documentroot` AS `customerroot`, `c`.`deactivated`,
|
||||||
`c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`,
|
`c`.`phpenabled` AS `phpenabled_customer`,
|
||||||
`d`.`mod_fcgid_maxrequests`
|
`d`.`phpenabled` AS `phpenabled_vhost`,
|
||||||
|
`d`.`mod_fcgid_starter`,`d`.`mod_fcgid_maxrequests`
|
||||||
FROM `".TABLE_PANEL_DOMAINS."` `d`
|
FROM `".TABLE_PANEL_DOMAINS."` `d`
|
||||||
|
|
||||||
LEFT JOIN `".TABLE_PANEL_CUSTOMERS."` `c` USING(`customerid`)
|
LEFT JOIN `".TABLE_PANEL_CUSTOMERS."` `c` USING(`customerid`)
|
||||||
|
|||||||
@@ -202,6 +202,14 @@ return array(
|
|||||||
'image' => 'icons/domain_add.png',
|
'image' => 'icons/domain_add.png',
|
||||||
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
|
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
|
'phpenabled' => array(
|
||||||
|
'label' => $lng['admin']['phpenabled'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
'openbasedir' => array(
|
'openbasedir' => array(
|
||||||
'label' => 'OpenBasedir',
|
'label' => 'OpenBasedir',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -225,6 +225,14 @@ return array(
|
|||||||
'image' => 'icons/domain_edit.png',
|
'image' => 'icons/domain_edit.png',
|
||||||
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
|
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
|
'phpenabled' => array(
|
||||||
|
'label' => $lng['admin']['phpenabled'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['phpenabled'])
|
||||||
|
),
|
||||||
'openbasedir' => array(
|
'openbasedir' => array(
|
||||||
'label' => 'OpenBasedir',
|
'label' => 'OpenBasedir',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -76,10 +76,9 @@ return array(
|
|||||||
'section_bssl' => array(
|
'section_bssl' => array(
|
||||||
'title' => $lng['admin']['webserversettings_ssl'],
|
'title' => $lng['admin']['webserversettings_ssl'],
|
||||||
'image' => 'icons/domain_add.png',
|
'image' => 'icons/domain_add.png',
|
||||||
'visible' => Settings::Get('system.use_ssl') == '1' ? true : false,
|
'visible' => Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false,
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'ssl_redirect' => array(
|
'ssl_redirect' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||||
'desc' => $lng['domains']['ssl_redirect']['description'],
|
'desc' => $lng['domains']['ssl_redirect']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -89,7 +88,7 @@ return array(
|
|||||||
'value' => array()
|
'value' => array()
|
||||||
),
|
),
|
||||||
'letsencrypt' => array(
|
'letsencrypt' => array(
|
||||||
'visible' => (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
'visible' => (Settings::Get('system.leenabled') == '1' ? true : false),
|
||||||
'label' => $lng['customer']['letsencrypt']['title'],
|
'label' => $lng['customer']['letsencrypt']['title'],
|
||||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -99,7 +98,6 @@ return array(
|
|||||||
'value' => array()
|
'value' => array()
|
||||||
),
|
),
|
||||||
'hsts_maxage' => array(
|
'hsts_maxage' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||||
'type' => 'int',
|
'type' => 'int',
|
||||||
@@ -108,7 +106,6 @@ return array(
|
|||||||
'value' => 0
|
'value' => 0
|
||||||
),
|
),
|
||||||
'hsts_sub' => array(
|
'hsts_sub' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -118,7 +115,6 @@ return array(
|
|||||||
'value' => array()
|
'value' => array()
|
||||||
),
|
),
|
||||||
'hsts_preload' => array(
|
'hsts_preload' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -87,10 +87,9 @@ return array(
|
|||||||
'section_bssl' => array(
|
'section_bssl' => array(
|
||||||
'title' => $lng['admin']['webserversettings_ssl'],
|
'title' => $lng['admin']['webserversettings_ssl'],
|
||||||
'image' => 'icons/domain_edit.png',
|
'image' => 'icons/domain_edit.png',
|
||||||
'visible' => Settings::Get('system.use_ssl') == '1' ? true : false,
|
'visible' => Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false,
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'ssl_redirect' => array(
|
'ssl_redirect' => array(
|
||||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false),
|
|
||||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||||
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
|
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -100,7 +99,7 @@ return array(
|
|||||||
'value' => array($result['ssl_redirect'])
|
'value' => array($result['ssl_redirect'])
|
||||||
),
|
),
|
||||||
'letsencrypt' => array(
|
'letsencrypt' => array(
|
||||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false) : false),
|
'visible' => Settings::Get('system.leenabled') == '1' ? true : false,
|
||||||
'label' => $lng['customer']['letsencrypt']['title'],
|
'label' => $lng['customer']['letsencrypt']['title'],
|
||||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -110,7 +109,6 @@ return array(
|
|||||||
'value' => array($result['letsencrypt'])
|
'value' => array($result['letsencrypt'])
|
||||||
),
|
),
|
||||||
'hsts_maxage' => array(
|
'hsts_maxage' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||||
'type' => 'int',
|
'type' => 'int',
|
||||||
@@ -119,7 +117,6 @@ return array(
|
|||||||
'value' => $result['hsts']
|
'value' => $result['hsts']
|
||||||
),
|
),
|
||||||
'hsts_sub' => array(
|
'hsts_sub' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -129,7 +126,6 @@ return array(
|
|||||||
'value' => array($result['hsts_sub'])
|
'value' => array($result['hsts_sub'])
|
||||||
),
|
),
|
||||||
'hsts_preload' => array(
|
'hsts_preload' => array(
|
||||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
|
||||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Main version variable
|
// Main version variable
|
||||||
$version = '0.9.38.3';
|
$version = '0.9.38.4';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
$dbversion = '201611241';
|
$dbversion = '201612110';
|
||||||
|
|
||||||
// Distribution branding-tag (used for Debian etc.)
|
// Distribution branding-tag (used for Debian etc.)
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|||||||
@@ -1710,6 +1710,6 @@ $lng['admin']['webserversettings_ssl'] = 'Webserver SSL-Einstellungen';
|
|||||||
$lng['admin']['domain_hsts_maxage']['title'] = 'HTTP Strict Transport Security (HSTS)';
|
$lng['admin']['domain_hsts_maxage']['title'] = 'HTTP Strict Transport Security (HSTS)';
|
||||||
$lng['admin']['domain_hsts_maxage']['description'] = '"max-age" Wert für den Strict-Transport-Security Header<br>Der Wert <i>0</i> deaktiviert HSTS für diese Domain. Meist wird der Wert <i>31536000</i> gerne genutzt (ein Jahr).';
|
$lng['admin']['domain_hsts_maxage']['description'] = '"max-age" Wert für den Strict-Transport-Security Header<br>Der Wert <i>0</i> deaktiviert HSTS für diese Domain. Meist wird der Wert <i>31536000</i> gerne genutzt (ein Jahr).';
|
||||||
$lng['admin']['domain_hsts_incsub']['title'] = 'Inkludiere HSTS für jede Subdomain';
|
$lng['admin']['domain_hsts_incsub']['title'] = 'Inkludiere HSTS für jede Subdomain';
|
||||||
$lng['admin']['domain_hsts_incsub']['description'] = 'Die optionale "includeSubDomains" Direktive, wenn vorhanden, signalisiert dem UA, dass die HSTS that the HSTS Regel für diese Domain und auch jede Subdomain dieser gilt.';
|
$lng['admin']['domain_hsts_incsub']['description'] = 'Die optionale "includeSubDomains" Direktive, wenn vorhanden, signalisiert dem UA, dass die HSTS Regel für diese Domain und auch jede Subdomain dieser gilt.';
|
||||||
$lng['admin']['domain_hsts_preload']['title'] = 'Füge Domain in die <a href="https://hstspreload.appspot.com/" target="_blank">HSTS preload Liste</a> hinzu';
|
$lng['admin']['domain_hsts_preload']['title'] = 'Füge Domain in die <a href="https://hstspreload.appspot.com/" target="_blank">HSTS preload Liste</a> hinzu';
|
||||||
$lng['admin']['domain_hsts_preload']['description'] = 'Wenn die Domain in die HSTS preload Liste, verwaltet von Chrome (und genutzt von Firefox und Safari), hinzugefügt werden soll, dann aktiviere diese Einstellung.<br>Die preload-Direktive zu senden kann PERMANTENTE KONSEQUENZEN haben und dazu führen, dass Benutzer auf diese Domain und auch Subdomains nicht zugreifen können.<br>Beachte Details unter <a href="hstspreload.appspot.com/#removal" target="_blank">hstspreload.appspot.com/#removal</a> bevor ein Header mit "preload" gesendet wird.';
|
$lng['admin']['domain_hsts_preload']['description'] = 'Wenn die Domain in die HSTS preload Liste, verwaltet von Chrome (und genutzt von Firefox und Safari), hinzugefügt werden soll, dann aktiviere diese Einstellung.<br>Die preload-Direktive zu senden kann PERMANTENTE KONSEQUENZEN haben und dazu führen, dass Benutzer auf diese Domain und auch Subdomains nicht zugreifen können.<br>Beachte Details unter <a href="hstspreload.appspot.com/#removal" target="_blank">hstspreload.appspot.com/#removal</a> bevor ein Header mit "preload" gesendet wird.';
|
||||||
|
|||||||
@@ -344,6 +344,15 @@ class apache extends HttpConfigBase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} // end of ssl-redirect check
|
} // end of ssl-redirect check
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// fallback of froxlor domain-data for processSpecialConfigTemplate()
|
||||||
|
$domain = array(
|
||||||
|
'domain' => Settings::Get('system.hostname'),
|
||||||
|
'loginname' => 'froxlor.panel',
|
||||||
|
'documentroot' => $mypath
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dirprotection, see #72
|
* dirprotection, see #72
|
||||||
@@ -488,7 +497,7 @@ class apache extends HttpConfigBase
|
|||||||
{
|
{
|
||||||
$php_options_text = '';
|
$php_options_text = '';
|
||||||
|
|
||||||
if ($domain['phpenabled'] == '1') {
|
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
|
||||||
// This vHost has PHP enabled and we are using the regular mod_php
|
// This vHost has PHP enabled and we are using the regular mod_php
|
||||||
|
|
||||||
if ($domain['openbasedir'] == '1') {
|
if ($domain['openbasedir'] == '1') {
|
||||||
@@ -808,7 +817,7 @@ class apache extends HttpConfigBase
|
|||||||
$_sslport = ":" . $ssldestport['port'];
|
$_sslport = ":" . $ssldestport['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
$domain['documentroot'] = 'https://%{HTTP_HOST}' . $_sslport . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ssl_vhost === true && $domain['ssl'] == '1' && Settings::Get('system.use_ssl') == '1') {
|
if ($ssl_vhost === true && $domain['ssl'] == '1' && Settings::Get('system.use_ssl') == '1') {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class apache_fcgid extends apache
|
|||||||
{
|
{
|
||||||
$php_options_text = '';
|
$php_options_text = '';
|
||||||
|
|
||||||
if($domain['phpenabled'] == '1')
|
if($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1')
|
||||||
{
|
{
|
||||||
$php = new phpinterface($domain);
|
$php = new phpinterface($domain);
|
||||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||||
|
|||||||
@@ -162,7 +162,25 @@ class lighttpd extends HttpConfigBase
|
|||||||
$this->lighttpd_data[$vhost_filename] .= "\t" . ')' . "\n";
|
$this->lighttpd_data[$vhost_filename] .= "\t" . ')' . "\n";
|
||||||
$this->lighttpd_data[$vhost_filename] .= "\t" . ')' . "\n";
|
$this->lighttpd_data[$vhost_filename] .= "\t" . ')' . "\n";
|
||||||
$this->lighttpd_data[$vhost_filename] .= ' )' . "\n";
|
$this->lighttpd_data[$vhost_filename] .= ' )' . "\n";
|
||||||
|
} else {
|
||||||
|
$domain = array(
|
||||||
|
'id' => 'none',
|
||||||
|
'domain' => Settings::Get('system.hostname'),
|
||||||
|
'adminid' => 1, /* first admin-user (superadmin) */
|
||||||
|
'guid' => Settings::Get('system.httpuser'),
|
||||||
|
'openbasedir' => 0,
|
||||||
|
'email' => Settings::Get('panel.adminmail'),
|
||||||
|
'loginname' => 'froxlor.panel',
|
||||||
|
'documentroot' => $mypath
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// fallback of froxlor domain-data for processSpecialConfigTemplate()
|
||||||
|
$domain = array(
|
||||||
|
'domain' => Settings::Get('system.hostname'),
|
||||||
|
'loginname' => 'froxlor.panel',
|
||||||
|
'documentroot' => $mypath
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row_ipsandports['specialsettings'] != '') {
|
if ($row_ipsandports['specialsettings'] != '') {
|
||||||
@@ -424,7 +442,7 @@ class lighttpd extends HttpConfigBase
|
|||||||
$_sslport = ":" . $ssldestport['port'];
|
$_sslport = ":" . $ssldestport['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
$domain['documentroot'] = 'https://%1' . $_sslport . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid using any whitespaces
|
// avoid using any whitespaces
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class lighttpd_fcgid extends lighttpd
|
|||||||
{
|
{
|
||||||
$php_options_text = '';
|
$php_options_text = '';
|
||||||
|
|
||||||
if($domain['phpenabled'] == '1')
|
if($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1')
|
||||||
{
|
{
|
||||||
$php = new phpinterface($domain);
|
$php = new phpinterface($domain);
|
||||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ class nginx extends HttpConfigBase
|
|||||||
$_sslport = ":" . $ssldestport['port'];
|
$_sslport = ":" . $ssldestport['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
$domain['documentroot'] = 'https://$host' . $_sslport . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid using any whitespaces
|
// avoid using any whitespaces
|
||||||
@@ -846,7 +846,7 @@ class nginx extends HttpConfigBase
|
|||||||
protected function composePhpOptions($domain, $ssl_vhost = false)
|
protected function composePhpOptions($domain, $ssl_vhost = false)
|
||||||
{
|
{
|
||||||
$phpopts = '';
|
$phpopts = '';
|
||||||
if ($domain['phpenabled'] == '1') {
|
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
|
||||||
$phpopts = "\tlocation ~ \.php {\n";
|
$phpopts = "\tlocation ~ \.php {\n";
|
||||||
$phpopts .= "\t\t" . 'try_files ' . $domain['nonexistinguri'] . ' @php;' . "\n";
|
$phpopts .= "\t\t" . 'try_files ' . $domain['nonexistinguri'] . ' @php;' . "\n";
|
||||||
$phpopts .= "\t" . '}' . "\n\n";
|
$phpopts .= "\t" . '}' . "\n\n";
|
||||||
@@ -882,7 +882,7 @@ class nginx extends HttpConfigBase
|
|||||||
|
|
||||||
$webroot_text .= "\n\t" . 'location / {' . "\n";
|
$webroot_text .= "\n\t" . 'location / {' . "\n";
|
||||||
|
|
||||||
if ($domain['phpenabled'] == '1') {
|
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
|
||||||
$webroot_text .= "\t" . 'index index.php index.html index.htm;' . "\n";
|
$webroot_text .= "\t" . 'index index.php index.html index.htm;' . "\n";
|
||||||
$webroot_text .= "\t\t" . 'try_files $uri $uri/ @rewrites;' . "\n";
|
$webroot_text .= "\t\t" . 'try_files $uri $uri/ @rewrites;' . "\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -895,7 +895,7 @@ class nginx extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$webroot_text .= "\t" . '}' . "\n\n";
|
$webroot_text .= "\t" . '}' . "\n\n";
|
||||||
if ($domain['phpenabled'] == '1') {
|
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
|
||||||
$webroot_text .= "\tlocation @rewrites {\n";
|
$webroot_text .= "\tlocation @rewrites {\n";
|
||||||
$webroot_text .= "\t\trewrite ^ /index.php last;\n";
|
$webroot_text .= "\t\trewrite ^ /index.php last;\n";
|
||||||
$webroot_text .= "\t}\n\n";
|
$webroot_text .= "\t}\n\n";
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class nginx_phpfpm extends nginx
|
|||||||
protected function composePhpOptions($domain, $ssl_vhost = false) {
|
protected function composePhpOptions($domain, $ssl_vhost = false) {
|
||||||
$php_options_text = '';
|
$php_options_text = '';
|
||||||
|
|
||||||
if ($domain['phpenabled'] == '1') {
|
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
|
||||||
$php = new phpinterface($domain);
|
$php = new phpinterface($domain);
|
||||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user