{% if endpoints %}
{% for ext, int in endpoints %}
Listen {{ ext }}
NameVirtualHost *:{{ ext }}
ServerName {{ private_address }}
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/{{ namespace }}/cert
SSLCertificateKeyFile /etc/apache2/ssl/{{ namespace }}/key
ProxyPass / http://localhost:{{ int }}/
ProxyPassReverse / http://localhost:{{ int }}/
ProxyPreserveHost on
Order deny,allow
Allow from all
Order allow,deny
Allow from all
{% endfor %}
{% endif %}