puppet: Support nginx_listen_port with http_only

This commit is contained in:
Casper Kvan Clausen 2020-07-31 19:00:45 -05:00 committed by Alex Vandiver
parent 9504d403b3
commit ed7a6d5e4d
2 changed files with 7 additions and 3 deletions

View File

@ -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',

View File

@ -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;