From 147aa71551077581b4c6156568e9b29e1c3fae9b Mon Sep 17 00:00:00 2001 From: Noel McLoughin Date: Tue, 30 Jan 2018 23:20:25 +0000 Subject: [PATCH] Do not add ServerAlias unless defined --- apache/vhosts/minimal.tmpl | 2 +- apache/vhosts/proxy.tmpl | 2 +- apache/vhosts/redirect.tmpl | 2 +- apache/vhosts/standard.tmpl | 2 +- pillar.example | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apache/vhosts/minimal.tmpl b/apache/vhosts/minimal.tmpl index 38545cb..6fe24fb 100644 --- a/apache/vhosts/minimal.tmpl +++ b/apache/vhosts/minimal.tmpl @@ -6,7 +6,7 @@ 'port': site.get('port', '80'), 'ServerName': sitename, - 'ServerAlias': site.get('ServerAlias', 'www.{0}'.format(sitename)), + 'ServerAlias': site.get('ServerAlias', ''), 'ServerAdmin': site.get('ServerAdmin', 'webmaster@{0}'.format(sitename)), diff --git a/apache/vhosts/proxy.tmpl b/apache/vhosts/proxy.tmpl index b762a9e..74a0098 100644 --- a/apache/vhosts/proxy.tmpl +++ b/apache/vhosts/proxy.tmpl @@ -6,7 +6,7 @@ 'port': site.get('port', '80'), 'ServerName': sitename, - 'ServerAlias': site.get('ServerAlias', 'www.{0}'.format(sitename)), + 'ServerAlias': site.get('ServerAlias', ''), 'ServerAdmin': site.get('ServerAdmin', 'webmaster@{0}'.format(sitename)), diff --git a/apache/vhosts/redirect.tmpl b/apache/vhosts/redirect.tmpl index af86ea1..1566323 100644 --- a/apache/vhosts/redirect.tmpl +++ b/apache/vhosts/redirect.tmpl @@ -7,7 +7,7 @@ 'port': site.get('port', '80'), 'ServerName': sitename, - 'ServerAlias': site.get('ServerAlias', 'www.{0}'.format(sitename)), + 'ServerAlias': site.get('ServerAlias', ''), 'ServerAdmin': site.get('ServerAdmin', 'webmaster@{0}'.format(sitename)), diff --git a/apache/vhosts/standard.tmpl b/apache/vhosts/standard.tmpl index 30684b0..db64c37 100644 --- a/apache/vhosts/standard.tmpl +++ b/apache/vhosts/standard.tmpl @@ -6,7 +6,7 @@ 'port': site.get('port', '80'), 'ServerName': sitename, - 'ServerAlias': site.get('ServerAlias', 'www.{0}'.format(sitename)), + 'ServerAlias': site.get('ServerAlias', ''), 'ServerAdmin': site.get('ServerAdmin', 'webmaster@{0}'.format(sitename)), diff --git a/pillar.example b/pillar.example index 35d0ee5..d14304f 100644 --- a/pillar.example +++ b/pillar.example @@ -62,7 +62,7 @@ apache: exclude_listen_directive: True # Do not add a Listen directive in httpd.conf ServerName: example.com # uses the unique ID above unless specified - ServerAlias: www.example.com + #ServerAlias: www.example.com # Do not add ServerAlias unless defined ServerAdmin: webmaster@example.com