mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
puppet: Support nginx_listen_port with http_only
This commit is contained in:
committed by
Tim Abbott
parent
12ac89ef3f
commit
584d71a221
@@ -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',
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user