aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorAlexandre Alouit <alexandre.alouit@gmail.com>2016-02-12 08:58:07 +0100
committerAlexandre Alouit <alexandre.alouit@gmail.com>2016-02-12 08:58:07 +0100
commit1cbfff4c2c1fc4017a33445d07c1ba59beb9cee1 (patch)
tree508c6a1828794b7fc98f4fc37c628e903fbe359d /src/server
parentab8d08cf39481d30d581ab65ca9fa745746e711e (diff)
parent88752da9c3c934ff2f71087ba3ad4b0ff0cb3eef (diff)
Merge pull request #37 from Rikarin/patch-1
Improvement add support for Apache aliasdomains subdomains
Diffstat (limited to '')
-rwxr-xr-xsrc/server/plugins-available/nginx_plugin.inc.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/plugins-available/nginx_plugin.inc.php b/src/server/plugins-available/nginx_plugin.inc.php
index d72591c..73dc3b3 100755
--- a/src/server/plugins-available/nginx_plugin.inc.php
+++ b/src/server/plugins-available/nginx_plugin.inc.php
@@ -1124,9 +1124,10 @@ class nginx_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'] == "*") {
@@ -1138,6 +1139,7 @@ class nginx_plugin {
if(is_array($subdomains)) {
foreach($subdomains as $subdomain) {
$temp_domains[] = $subdomain['domain'];
+ $sub_prefixes[] = str_replace($domain, "", $subdomain['domain']);
}
}
@@ -1149,6 +1151,10 @@ class nginx_plugin {
if(isset($aliasdomain['subdomain']) && ! empty($aliasdomain['subdomain'])) {
$temp_domains[] = $aliasdomain['subdomain'] . "." . $aliasdomain['domain'];
}
+
+ foreach($sub_prefixes as $s) {
+ $temp_domains[] = $s . $aliasdomain['domain'];
+ }
}
}