diff --git a/http/Provision/Config/Apache/vhost.tpl.php b/http/Provision/Config/Apache/vhost.tpl.php index 5cacca4..1187f14 100644 --- a/http/Provision/Config/Apache/vhost.tpl.php +++ b/http/Provision/Config/Apache/vhost.tpl.php @@ -1,10 +1,10 @@ > site_mail) : ?> - ServerAdmin site_mail; ?> + ServerAdmin site_mail; ?> - DocumentRoot root; ?> - + DocumentRoot root; ?> + ServerName uri; ?> SetEnv db_type @@ -20,7 +20,7 @@ SetEnv db_port -aliases)) { print "\n ServerAlias " . implode("\n ServerAlias ", $this->aliases) . "\n"; } @@ -41,8 +41,8 @@ if ($this->redirection || $ssl_redirection) { } elseif (!$ssl_redirection && $this->redirection) { // Redirect all aliases to the main http url. - print " RewriteCond %{HTTP_HOST} !^{$this->redirection}$ [NC]\n"; - print " RewriteRule ^/*(.*)$ http://{$this->redirection}/$1 [NE,L,R=301]\n"; + print " RewriteCond %{HTTP_HOST} !^{$this->uri}$ [NC]\n"; + print " RewriteRule ^/*(.*)$ http://{$this->uri}/$1 [NE,L,R=301]\n"; } } ?> @@ -83,7 +83,6 @@ if ($this->redirection || $ssl_redirection) { php_flag engine off - - +