diff --git a/defaults/main.yml b/defaults/main.yml
index 1f37bbae4efa162076b4a39ab2a4e4e2101b1727..96bf759b184308d2ca9146d797292d186d9bb14d 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -6,6 +6,9 @@ gitlab:
     external_url: 'https://localhost'
     path: '/var/opt/gitlab/backups'
   pages_external_url: ~
+  pages_listen: ['[::1]:11181', '127.0.0.1:11181']
+  pages_listen_ssl: []
+  pages_redirect_http: 'false'
   registry_path: ~
   registry_external_url: ~
   gitlab_ssh_host: 'localhost'
diff --git a/templates/gitlab.rb.j2 b/templates/gitlab.rb.j2
index 985f1dab6662721ad69f45015623f3bd67b38f2f..bdc0fe7f57e9cc8488a100661fcaae6b5cf0827c 100644
--- a/templates/gitlab.rb.j2
+++ b/templates/gitlab.rb.j2
@@ -1388,10 +1388,10 @@ pages_external_url "{{ gitlab.pages_external_url }}"
 gitlab_pages['enable'] = true
 
 ##! Configure to expose GitLab Pages on external IP address, serving the HTTP
-gitlab_pages['external_http'] = ['[::1]:11181', '127.0.0.1:11181']
+gitlab_pages['external_http'] = {{ gitlab.pages_listen|to_json }}
 
 ##! Configure to expose GitLab Pages on external IP address, serving the HTTPS
-# gitlab_pages['external_https'] = []
+gitlab_pages['external_https'] = {{ gitlab.pages_listen_ssl|to_json }}
 
 ##! Configure to use the default list of cipher suites
 # gitlab_pages['insecure_ciphers'] = false
@@ -1420,8 +1420,8 @@ gitlab_pages['external_http'] = ['[::1]:11181', '127.0.0.1:11181']
 ##! Configure GitLab Pages to use an HTTP Proxy
 # gitlab_pages['http_proxy'] = "http://example:8080"
 
-# gitlab_pages['redirect_http'] = true
-# gitlab_pages['use_http2'] = true
+#gitlab_pages['redirect_http'] = true
+gitlab_pages['use_http2'] = true
 # gitlab_pages['dir'] = "/var/opt/gitlab/gitlab-pages"
 # gitlab_pages['log_directory'] = "/var/log/gitlab/gitlab-pages"