Add support for SSL certificates in the proxy templatetags/v0.37.4
{% if site.get('ErrorLog') != False %}ErrorLog {{ vals.ErrorLog }}{% endif %} | {% if site.get('ErrorLog') != False %}ErrorLog {{ vals.ErrorLog }}{% endif %} | ||||
{% if site.get('CustomLog') != False %}CustomLog {{ vals.CustomLog }} {{ vals.LogFormat }}{% 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 }} | ProxyPreserveHost {{ vals.ProxyPreserveHost }} | ||||
{% for proxy, proxyargs in vals.ProxyRoute|dictsort|reverse %} | {% for proxy, proxyargs in vals.ProxyRoute|dictsort|reverse %} | ||||
{% set proxyvals = { | {% set proxyvals = { |
{% if site.get('SSLCertificateKeyFile') %} | {% if site.get('SSLCertificateKeyFile') %} | ||||
SSLCertificateKeyFile {{ site.SSLCertificateKeyFile }} | SSLCertificateKeyFile {{ site.SSLCertificateKeyFile }} | ||||
{% endif %} | {% endif %} | ||||
{% if site.get('SSLCertificateChainFile') %} | |||||
SSLCertificateChainFile {{ site.SSLCertificateChainFile}} | |||||
{% endif %} | |||||
{% endif %} | {% endif %} | ||||
{% for path, dir in site.get('Directory', {}).items() %} | {% for path, dir in site.get('Directory', {}).items() %} |
SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired | 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 | 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: | Directory: | ||||
# "default" is a special case; Adds ``/path/to/www/dir/example.com`` | # "default" is a special case; Adds ``/path/to/www/dir/example.com`` |