diff --git a/puppet/zulip/manifests/app_frontend.pp b/puppet/zulip/manifests/app_frontend.pp index 386c834880..830a93b2ba 100644 --- a/puppet/zulip/manifests/app_frontend.pp +++ b/puppet/zulip/manifests/app_frontend.pp @@ -5,7 +5,11 @@ class zulip::app_frontend { include zulip::app_frontend_once $nginx_http_only = zulipconf('application_server', 'http_only', undef) - $nginx_listen_port = zulipconf('application_server', 'nginx_listen_port', 443) + if $nginx_http_only != '' { + $nginx_listen_port = zulipconf('application_server', 'nginx_listen_port', 80) + } else { + $nginx_listen_port = zulipconf('application_server', 'nginx_listen_port', 443) + } $no_serve_uploads = zulipconf('application_server', 'no_serve_uploads', undef) $ssl_dir = $::osfamily ? { 'debian' => '/etc/ssl', diff --git a/puppet/zulip/templates/nginx/zulip-enterprise.template.erb b/puppet/zulip/templates/nginx/zulip-enterprise.template.erb index 58815b1a28..2e23d2654b 100644 --- a/puppet/zulip/templates/nginx/zulip-enterprise.template.erb +++ b/puppet/zulip/templates/nginx/zulip-enterprise.template.erb @@ -16,8 +16,8 @@ include /etc/nginx/zulip-include/upstreams; server { <% if @nginx_http_only != '' -%> - listen 80; - listen [::]:80; + listen <%= @nginx_listen_port %>; + listen [::]:<%= @nginx_listen_port %>; <% else -%> listen <%= @nginx_listen_port %> http2; listen [::]:<%= @nginx_listen_port %> http2;