Here is the snippet from my manifest:
apache::vhost { 'default-http':
port => 80,
serveraliases => ['example.test.com', 'example2.test.com',],
docroot => '/var/www/html',
rewrites => [
{
comment => 'Bounce to https',
rewrite_cond => ['"%{SERVER_PROTOCOL}" "!^HTTP$"'],
rewrite_rule => ['"^/?(.*)" "https://%{HTTP_HOST}/$1" [R=permanent,L]'],
}
],
}
As you can see in the following config, the aliases are nowhere to be found:
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************
<VirtualHost *:80>
ServerName default-http
## Vhost docroot
DocumentRoot "/var/www/html"
## Directories, there should at least be a declaration for /var/www/html
<Directory "/var/www/html">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
## Logging
ErrorLog "/var/log/httpd/default-http_error.log"
ServerSignature Off
CustomLog "/var/log/httpd/default-http_access.log" combined
## Rewrite rules
RewriteEngine On
#Bounce to https
RewriteCond "%{SERVER_PROTOCOL}" "!^HTTP$"
RewriteRule "^/?(.*)" "https://%{HTTP_HOST}/$1" [R=permanent,L]
I assume there is something wrong with my serveraliases line, as everything else shows up in the config other than that line. Unfortunately I do not see any errors in the logs to guide me.
What am I doing wrong?