$comment = '', $sshkey = absent,
$groups = '', $shell = '/bin/false', $manage_user = true,
$ssl = false, $listen = '*', $https_redirect = false,
- $canonical = false) {
+ $canonical = false, $canonical_exceptions = '') {
$vhost = $filename ? {
'' => "$title",
</IfModule>
<% end %>
<% if canonical != false %>
+ <%- for canonical_exception in canonical_exceptions -%>
+ RewriteCond %{HTTP_HOST} !=<%= canonical_exception %> [NC]
+ <%- end -%>
RewriteCond %{HTTP_HOST} !=<%= canonical %> [NC]
RewriteCond %{HTTP_HOST} !=""
RewriteRule ^/(.*) <%= protocol %>://<%= canonical %>/$1 [L,R=301]