Add apache default port flag

Change-Id: Id4f550a573a7feb631e4fa0da6d435118f712b88
diff --git a/apache/files/ports.conf b/apache/files/ports.conf
index 8658d96..5ad5bd1 100644
--- a/apache/files/ports.conf
+++ b/apache/files/ports.conf
@@ -1,6 +1,8 @@
 # If you just change the port or add more ports here, you will likely also
 # have to change the VirtualHost statement in
 # /etc/apache2/sites-enabled/000-default.conf
+{%- from "apache/map.jinja" import listen_ports, server with context %}
+{%- if server.get('bind', {}).get('listen_default_ports', True) %}
 
 Listen 80
 
@@ -11,8 +13,8 @@
 <IfModule mod_gnutls.c>
 	Listen 443
 </IfModule>
+{%- endif %}
 
-{%- from "apache/map.jinja" import listen_ports with context %}
 {%- for port in listen_ports.iterkeys() %}
 
 {%- if port not in [80, 443] %}