Browse Source

Fix incorrect syntax in pillar example for SSLCertificateFile, SSLCertificateKeyFile

Fix check for SSLCertificateFile, SSLCertificateKeyFile variables in vhosts/standard.tmpl, now using dict.get()
master
Mosen 9 years ago
parent
commit
f135e2e0d5
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      apache/vhosts/standard.tmpl
  2. +2
    -2
      pillar.example

+ 2
- 2
apache/vhosts/standard.tmpl View File

@@ -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 %}

+ 2
- 2
pillar.example View File

@@ -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``

Loading…
Cancel
Save