various fixes for idn converted domains + fix undefined index alias when editing a domain with alias
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -1227,7 +1227,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
$adminid = $result['adminid'];
|
$adminid = $result['adminid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = isset($_POST['alias']) ? intval($_POST['alias']) : 0;
|
||||||
$issubof = intval($_POST['issubof']);
|
$issubof = intval($_POST['issubof']);
|
||||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||||
$caneditdomain = isset($_POST['caneditdomain']) ? intval($_POST['caneditdomain']) : 0;
|
$caneditdomain = isset($_POST['caneditdomain']) ? intval($_POST['caneditdomain']) : 0;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (! defined('MASTER_CRONJOB'))
|
if (! defined('MASTER_CRONJOB'))
|
||||||
die('You cannot access this file directly!');
|
die('You cannot access this file directly!');
|
||||||
|
|
||||||
@@ -228,7 +227,7 @@ class apache extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$is_redirect) {
|
if (! $is_redirect) {
|
||||||
// create fcgid <Directory>-Part (starter is created in apache_fcgid)
|
// create fcgid <Directory>-Part (starter is created in apache_fcgid)
|
||||||
if (Settings::Get('system.mod_fcgid_ownvhost') == '1' && Settings::Get('system.mod_fcgid') == '1') {
|
if (Settings::Get('system.mod_fcgid_ownvhost') == '1' && Settings::Get('system.mod_fcgid') == '1') {
|
||||||
$configdir = makeCorrectDir(Settings::Get('system.mod_fcgid_configdir') . '/froxlor.panel/' . Settings::Get('system.hostname'));
|
$configdir = makeCorrectDir(Settings::Get('system.mod_fcgid_configdir') . '/froxlor.panel/' . Settings::Get('system.hostname'));
|
||||||
@@ -278,13 +277,14 @@ class apache extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
$this->virtualhosts_data[$vhosts_filename] .= ' </Directory>' . "\n";
|
$this->virtualhosts_data[$vhosts_filename] .= ' </Directory>' . "\n";
|
||||||
}
|
}
|
||||||
} // create php-fpm <Directory>-Part (config is created in apache_fcgid)
|
}
|
||||||
elseif (Settings::Get('phpfpm.enabled') == '1') {
|
elseif (Settings::Get('phpfpm.enabled') == '1') {
|
||||||
|
// create php-fpm <Directory>-Part (config is created in apache_fcgid)
|
||||||
$domain = array(
|
$domain = array(
|
||||||
'id' => 'none',
|
'id' => 'none',
|
||||||
'domain' => Settings::Get('system.hostname'),
|
'domain' => Settings::Get('system.hostname'),
|
||||||
'adminid' => 1, /* first admin-user (superadmin) */
|
'adminid' => 1, /* first admin-user (superadmin) */
|
||||||
'mod_fcgid_starter' => - 1,
|
'mod_fcgid_starter' => - 1,
|
||||||
'mod_fcgid_maxrequests' => - 1,
|
'mod_fcgid_maxrequests' => - 1,
|
||||||
'guid' => Settings::Get('phpfpm.vhost_httpuser'),
|
'guid' => Settings::Get('phpfpm.vhost_httpuser'),
|
||||||
'openbasedir' => 0,
|
'openbasedir' => 0,
|
||||||
@@ -615,10 +615,10 @@ class apache extends HttpConfigBase
|
|||||||
} else {
|
} else {
|
||||||
$stats_text .= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
$stats_text .= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
||||||
}
|
}
|
||||||
} // if the docroots are equal, we still have to set an alias for awstats
|
} // if the docroots are equal, we still have to set an alias for awstats
|
||||||
// because the stats are in /awstats/[domain], not just /awstats/
|
// because the stats are in /awstats/[domain], not just /awstats/
|
||||||
// also, the awstats-icons are someplace else too!
|
// also, the awstats-icons are someplace else too!
|
||||||
// -> webalizer does not need this!
|
// -> webalizer does not need this!
|
||||||
elseif (Settings::Get('system.awstats_enabled') == '1') {
|
elseif (Settings::Get('system.awstats_enabled') == '1') {
|
||||||
$stats_text .= ' Alias /awstats "' . makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
$stats_text .= ' Alias /awstats "' . makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
||||||
$stats_text .= ' Alias /awstats-icon "' . makeCorrectDir(Settings::Get('system.awstats_icons')) . '"' . "\n";
|
$stats_text .= ' Alias /awstats-icon "' . makeCorrectDir(Settings::Get('system.awstats_icons')) . '"' . "\n";
|
||||||
@@ -873,7 +873,7 @@ class apache extends HttpConfigBase
|
|||||||
$domain['documentroot'] = trim($domain['documentroot']);
|
$domain['documentroot'] = trim($domain['documentroot']);
|
||||||
|
|
||||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||||
$corrected_docroot = $this->idnaConvert->encode_uri($domain['documentroot']);
|
$corrected_docroot = $domain['documentroot'];
|
||||||
|
|
||||||
// prevent empty return-cde
|
// prevent empty return-cde
|
||||||
$code = "301";
|
$code = "301";
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ if (count($all_certs) == 0) {
|
|||||||
|
|
||||||
$cert_data = openssl_x509_parse($cert['ssl_cert_file']);
|
$cert_data = openssl_x509_parse($cert['ssl_cert_file']);
|
||||||
|
|
||||||
$cert['domain'] = $idna_convert->encode($cert['domain']);
|
$cert['domain'] = $idna_convert->decode($cert['domain']);
|
||||||
|
|
||||||
$adminCustomerLink = "";
|
$adminCustomerLink = "";
|
||||||
if (AREA == 'admin') {
|
if (AREA == 'admin') {
|
||||||
|
|||||||
Reference in New Issue
Block a user