mirror of https://github.com/zulip/zulip.git
puppet: Support nginx_listen_port with http_only
This commit is contained in:
parent
9504d403b3
commit
ed7a6d5e4d
|
@ -5,7 +5,11 @@ class zulip::app_frontend {
|
|||
include zulip::app_frontend_once
|
||||
|
||||
$nginx_http_only = zulipconf('application_server', 'http_only', undef)
|
||||
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',
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue