瀏覽代碼

Merge pull request #58 from multani/proxy-ssl

Add support for SSL certificates in the proxy template
tags/v0.37.4
Forrest 9 年之前
父節點
當前提交
e10003b077
共有 3 個檔案被更改,包括 15 行新增0 行删除
  1. +11
    -0
      apache/vhosts/proxy.tmpl
  2. +3
    -0
      apache/vhosts/standard.tmpl
  3. +1
    -0
      pillar.example

+ 11
- 0
apache/vhosts/proxy.tmpl 查看文件

@@ -34,6 +34,17 @@
{% if site.get('ErrorLog') != False %}ErrorLog {{ vals.ErrorLog }}{% endif %}
{% if site.get('CustomLog') != False %}CustomLog {{ vals.CustomLog }} {{ vals.LogFormat }}{% endif %}

{% if site.get('SSLCertificateFile') %}
SSLEngine on
SSLCertificateFile {{ site.SSLCertificateFile }}
{% if site.get('SSLCertificateKeyFile') %}
SSLCertificateKeyFile {{ site.SSLCertificateKeyFile }}
{% endif %}
{% if site.get('SSLCertificateChainFile') %}
SSLCertificateChainFile {{ site.SSLCertificateChainFile}}
{% endif %}
{% endif %}

ProxyPreserveHost {{ vals.ProxyPreserveHost }}
{% for proxy, proxyargs in vals.ProxyRoute|dictsort|reverse %}
{% set proxyvals = {

+ 3
- 0
apache/vhosts/standard.tmpl 查看文件

@@ -54,6 +54,9 @@
{% if site.get('SSLCertificateKeyFile') %}
SSLCertificateKeyFile {{ site.SSLCertificateKeyFile }}
{% endif %}
{% if site.get('SSLCertificateChainFile') %}
SSLCertificateChainFile {{ site.SSLCertificateChainFile}}
{% endif %}
{% endif %}

{% for path, dir in site.get('Directory', {}).items() %}

+ 1
- 0
pillar.example 查看文件

@@ -46,6 +46,7 @@ apache:

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
SSLCertificateChainFile: /etc/ssl/mycert.chain.pem # if you require a chain of server certificates file

Directory:
# "default" is a special case; Adds ``/path/to/www/dir/example.com``

Loading…
取消
儲存