Allow to bind proxy on specific address

Due to security reason it is desired to bind site to
specific address. This patch adds such ability by
setting site.host.address variable
If not defined apache will listen on 0.0.0.0

Change-Id: Ia0e1fcc23d6491e8c17a09e5f3f4040d50fbab84
diff --git a/apache/files/proxy.conf b/apache/files/proxy.conf
index bd63a77..baad919 100644
--- a/apache/files/proxy.conf
+++ b/apache/files/proxy.conf
@@ -1,5 +1,8 @@
 {%- set site = salt['pillar.get']('apache:server:site:'+site_name) %}
-<VirtualHost *:{% if site.host.port is defined %}{{ site.host.port }}{% else %}{% if site.ssl is defined %}443{% else %}80{% endif %}{% endif %}>
+
+Listen {{ site.host.get('address', '0.0.0.0') }}:{% if site.host.port is defined %}{{ site.host.port }}{% else %}{% if site.ssl is defined %}443{% else %}80{% endif %}{% endif %}
+
+<VirtualHost {{ site.host.get('address', '0.0.0.0') }}:{% if site.host.port is defined %}{{ site.host.port }}{% else %}{% if site.ssl is defined %}443{% else %}80{% endif %}{% endif %}>
   {%- include "apache/files/_name.conf" %}
   {%- include "apache/files/_ssl.conf" %}
   {%- include "apache/files/_log.conf" %}
diff --git a/apache/map.jinja b/apache/map.jinja
index 5fbd71b..5ebdf9f 100644
--- a/apache/map.jinja
+++ b/apache/map.jinja
@@ -102,7 +102,7 @@
 {# TODO: move away from managing listen in ports.conf, instead add this directive #}
 {# to specific service config. Currently it conflits with horizon formula, that manage #}
 {# port.conf by theirown, it leads to races when applying horizon/apache states. #}
-{%- if site.get('type', '') != 'wsgi' %}
+{%- if site.get('type', '') not in ['wsgi', 'proxy'] %}
 {%- if site.host.get('port', 80) %}
 {%- do listen_ports.update({site.host.get('port', 80): None}) %}
 {%- endif %}