Commit 5162ca44 authored by notzach's avatar notzach Committed by helmo

Issue #2421543 by notzach: Changing how Apache ServerAliases are defined

parent bded8935
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
<?php <?php
if (sizeof($this->aliases)) { if (sizeof($this->aliases)) {
print "\n ServerAlias " . implode("\n ServerAlias ", $this->aliases) . "\n"; foreach ($this->aliases as $alias) {
print " ServerAlias " . $alias . "\n";
}
} }
?> ?>
......
...@@ -17,10 +17,12 @@ ...@@ -17,10 +17,12 @@
SSLCertificateKeyFile <?php print $ssl_cert_key; ?> SSLCertificateKeyFile <?php print $ssl_cert_key; ?>
<?php <?php
if (sizeof($this->aliases)) { if (sizeof($this->aliases)) {
print "\n ServerAlias " . implode("\n ServerAlias ", $this->aliases) . "\n"; foreach ($this->aliases as $alias) {
print " ServerAlias " . $alias . "\n";
} }
}
?> ?>
RewriteEngine on RewriteEngine on
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
<?php <?php
if (sizeof($this->aliases)) { if (sizeof($this->aliases)) {
print "\n ServerAlias " . implode("\n ServerAlias ", $this->aliases) . "\n"; foreach ($this->aliases as $alias) {
print " ServerAlias " . $alias . "\n";
}
} }
?> ?>
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
ServerName <?php print $this->uri; ?> ServerName <?php print $this->uri; ?>
<?php if (is_array($this->aliases)) : <?php
foreach ($this->aliases as $alias) : ?> if (sizeof($this->aliases)) {
ServerAlias <?php print $alias; ?> foreach ($this->aliases as $alias) {
<?php print " ServerAlias " . $alias . "\n";
endforeach; }
endif; ?> }
?>
RewriteEngine on RewriteEngine on
# the ? at the end is to remove any query string in the original url # the ? at the end is to remove any query string in the original url
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment