Commit ce28fe25 authored by drumm's avatar drumm Committed by Neil Drumm

Correct varialbes and such.

parent d669cfa2
......@@ -16,8 +16,8 @@
SetEnv db_host <?php print urlencode($db_host); ?>
<?php if (!$redirection && is_array($aliases)) :
foreach ($aliases as $alias_url) :
<?php if (!$this->redirection && is_array($this->aliases)) :
foreach ($this->aliases as $alias_url) :
if (trim($alias_url)) : ?>
ServerAlias <?php print $alias_url; ?>
......@@ -36,6 +36,6 @@
</VirtualHost>
<?php
if ($redirection) {
include('vhost_redirect.tpl.php');
if ($this->redirection) {
require(dirname(__FILE__) . '/http/apache/vhost_redirect.tpl.php');
}
<VirtualHost *:<?php print $site_port; ?>>
<?php if ($site_mail) : ?>
ServerAdmin <?php print $site_mail; ?>
<VirtualHost *:<?php print $this->site_port; ?>>
<?php if ($this->site_mail) : ?>
ServerAdmin <?php print $this->site_mail; ?>
<?php endif;?>
<?php if (is_array($aliases) && count($aliases)): ?>
ServerName <?php print array_pop($aliases); ?>
<?php if (is_array($this->aliases) && count($this->aliases)): ?>
ServerName <?php print array_pop($this->aliases); ?>
<?php if (count($aliases)): ?>
ServerAlias <?php print join(" ", $aliases); ?>
<?php if (count($this->aliases)): ?>
ServerAlias <?php print join(" ", $this->aliases); ?>
<?php endif; ?>
<?php else:
# this should never happen and has the potential of creating an infinite redirection loop
?>
ServerName <?php print $uri ?>
ServerName <?php print $this->uri ?>
<?php endif; ?>
<?php if ($ssl_redirect): ?>
RedirectMatch permanent ^(.*) https://<?php print $uri ?>$1
RedirectMatch permanent ^(.*) https://<?php print $this->uri ?>$1
<?php else: ?>
RedirectMatch permanent ^(.*) http://<?php print $uri ?>$1
RedirectMatch permanent ^(.*) http://<?php print $this->uri ?>$1
<?php endif; ?>
</VirtualHost>
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