solve sub-sub-domain-problem by dynamically assigning vhost-number in vhost-filename (the deeper the lower the number thus being included earlier), fixes #1535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -610,14 +610,15 @@ class apache {
|
||||
&& ((int)$domain['ismainbutsubto'] == 0
|
||||
|| domainMainToSubExists($domain['ismainbutsubto']) == false)
|
||||
) {
|
||||
$vhost_no = '22';
|
||||
$vhost_no = '35';
|
||||
} elseif ((int)$domain['parentdomainid'] == 0
|
||||
&& isCustomerStdSubdomain((int)$domain['id']) == false
|
||||
&& (int)$domain['ismainbutsubto'] > 0
|
||||
) {
|
||||
$vhost_no = '21';
|
||||
$vhost_no = '30';
|
||||
} else {
|
||||
$vhost_no = '20';
|
||||
// number of dots in a domain specifies it's position (and depth of subdomain) starting at 29 going downwards on higher depth
|
||||
$vhost_no = (string)(30 - substr_count($domain['domain'], ".") + 1);
|
||||
}
|
||||
|
||||
if ($ssl_vhost === true) {
|
||||
@@ -1118,9 +1119,9 @@ class apache {
|
||||
$vhosts_file = '';
|
||||
|
||||
// sort by filename so the order is:
|
||||
// 1. subdomains 20
|
||||
// 2. subdomains as main-domains 21
|
||||
// 3. main-domains 22
|
||||
// 1. subdomains x-29
|
||||
// 2. subdomains as main-domains 30
|
||||
// 3. main-domains 35
|
||||
// #437
|
||||
ksort($this->virtualhosts_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user