From f135e2e0d53c800c2e35409a75801834c757c56f Mon Sep 17 00:00:00 2001 From: Mosen Date: Thu, 14 May 2015 12:38:27 +1000 Subject: [PATCH] Fix incorrect syntax in pillar example for SSLCertificateFile, SSLCertificateKeyFile Fix check for SSLCertificateFile, SSLCertificateKeyFile variables in vhosts/standard.tmpl, now using dict.get() --- apache/vhosts/standard.tmpl | 4 ++-- pillar.example | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apache/vhosts/standard.tmpl b/apache/vhosts/standard.tmpl index 1464a91..bf91a26 100644 --- a/apache/vhosts/standard.tmpl +++ b/apache/vhosts/standard.tmpl @@ -48,10 +48,10 @@ {% if site.get('DocumentRoot') != False %}DocumentRoot {{ vals.DocumentRoot }}{% endif %} {% if site.get('VirtualDocumentRoot') %}VirtualDocumentRoot {{ vals.VirtualDocumentRoot }}{% endif %} - {% if site.SSLCertificateFile is defined %} + {% if site.get('SSLCertificateFile') != False %} SSLEngine on SSLCertificateFile {{ site.SSLCertificateFile }} - {% if site.SSLCertificateKeyFile is defined %} + {% if site.get('SSLCertificateKeyFile') != False %} SSLCertificateKeyFile {{ site.SSLCertificateKeyFile }} {% endif %} {% endif %} diff --git a/pillar.example b/pillar.example index 75b749a..81d5215 100644 --- a/pillar.example +++ b/pillar.example @@ -44,8 +44,8 @@ apache: DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com - SSLCertificateFile = /etc/ssl/mycert.pem # if ssl is desired - SSLCertificateKeyFile = /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file + SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired + SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file Directory: # "default" is a special case; Adds ``/path/to/www/dir/example.com``