aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/plugins-available
diff options
context:
space:
mode:
authorSatoshi <satoshi@gshost.eu>2016-02-11 10:13:14 +0100
committerSatoshi <satoshi@gshost.eu>2016-02-11 10:13:14 +0100
commit0d2ac5e1f9a1f94b0630bd2199e40ed81d59a71f (patch)
tree824a685b94fbb3c464daa3e13bae2c35c088395e /src/server/plugins-available
parentab8d08cf39481d30d581ab65ca9fa745746e711e (diff)
Add support for subs for aliases
Add support for subdomains for aliases. If you have both, subs for your main domain and aliases for your main domain, you need cert for subs of yours aliases.
Diffstat (limited to 'src/server/plugins-available')
-rwxr-xr-xsrc/server/plugins-available/nginx_plugin.inc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/plugins-available/nginx_plugin.inc.php b/src/server/plugins-available/nginx_plugin.inc.php
index d72591c..b451106 100755
--- a/src/server/plugins-available/nginx_plugin.inc.php
+++ b/src/server/plugins-available/nginx_plugin.inc.php
@@ -1127,6 +1127,7 @@ class nginx_plugin {
$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($s as $sub_prefixes) {
+ $temp_domains[] = $s . $aliasdomain['domain'];
+ }
}
}