aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorAlexandre Alouit <alexandre.alouit@gmail.com>2016-02-12 08:58:49 +0100
committerAlexandre Alouit <alexandre.alouit@gmail.com>2016-02-12 08:58:53 +0100
commit77d70f96a7e5d43625b6aa3d45a9e96437f867c9 (patch)
treeb0648445f1343cfabd9701f5c633dd0ff95524a7 /src/server
parent1cbfff4c2c1fc4017a33445d07c1ba59beb9cee1 (diff)
Improvement
add support for Nginx aliasdomains subdomains
Diffstat (limited to 'src/server')
-rwxr-xr-xsrc/server/plugins-available/apache2_plugin.inc.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/plugins-available/apache2_plugin.inc.php b/src/server/plugins-available/apache2_plugin.inc.php
index 5ac6c78..935b970 100755
--- a/src/server/plugins-available/apache2_plugin.inc.php
+++ b/src/server/plugins-available/apache2_plugin.inc.php
@@ -963,9 +963,10 @@ class apache2_plugin {
// default values
$temp_domains = array();
- $lddomain = $domain;
- $subdomains = null;
+ $lddomain = $domain;
+ $subdomains = null;
$aliasdomains = null;
+ $sub_prefixes = array();
//* be sure to have good domain
if($data['new']['subdomain'] == "www" OR $data['new']['subdomain'] == "*") {
@@ -977,6 +978,7 @@ class apache2_plugin {
if(is_array($subdomains)) {
foreach($subdomains as $subdomain) {
$temp_domains[] = $subdomain['domain'];
+ $sub_prefixes[] = str_replace($domain, "", $subdomain['domain']);
}
}
@@ -988,6 +990,10 @@ class apache2_plugin {
if(isset($aliasdomain['subdomain']) && ! empty($aliasdomain['subdomain'])) {
$temp_domains[] = $aliasdomain['subdomain'] . "." . $aliasdomain['domain'];
}
+
+ foreach($sub_prefixes as $s) {
+ $temp_domains[] = $s . $aliasdomain['domain'];
+ }
}
}