From aae740188866c8478a98b4d29d164b2ce3551739 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 30 Jan 2017 03:04:02 -0500 Subject: [PATCH 1/2] fix: always set a default ssl port for apps with ssl enabled Closes #2535 --- plugins/nginx-vhosts/functions | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 8f1af2c40..eaf3ce409 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -100,14 +100,13 @@ configure_nginx_ports() { config_set --no-restart "$APP" DOKKU_NGINX_PORT="$NGINX_PORT" fi if [[ -z "$DOKKU_NGINX_SSL_PORT" ]]; then - if (is_ssl_enabled "$APP") && [[ -z "$RAW_TCP_PORTS" ]]; then - if [[ "$IS_APP_VHOST_ENABLED" == "false" ]]; then + if (is_ssl_enabled "$APP") + local NGINX_SSL_PORT=443 + if [[ -z "$RAW_TCP_PORTS" ]] && [[ "$IS_APP_VHOST_ENABLED" == "false" ]]; then dokku_log_info1 "no nginx ssl port set. setting to random open high port" - local NGINX_SSL_PORT=$(get_available_port) - else - local NGINX_SSL_PORT=443 + NGINX_SSL_PORT=$(get_available_port) fi - config_set --no-restart "$APP" DOKKU_NGINX_SSL_PORT="$NGINX_SSL_PORT" + config_set --no-restart "$APP" DOKKU_NGINX_SSL_PORT="$NGINX_SSL_PORT" fi fi if [[ -z "$DOKKU_PROXY_PORT_MAP" ]]; then From 336ffc9b0991efc12ca4a657851d9083cb96c13a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 5 Feb 2017 13:39:49 -0500 Subject: [PATCH 2/2] Update functions --- plugins/nginx-vhosts/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index eaf3ce409..85c0aebfe 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -100,7 +100,7 @@ configure_nginx_ports() { config_set --no-restart "$APP" DOKKU_NGINX_PORT="$NGINX_PORT" fi if [[ -z "$DOKKU_NGINX_SSL_PORT" ]]; then - if (is_ssl_enabled "$APP") + if (is_ssl_enabled "$APP"); then local NGINX_SSL_PORT=443 if [[ -z "$RAW_TCP_PORTS" ]] && [[ "$IS_APP_VHOST_ENABLED" == "false" ]]; then dokku_log_info1 "no nginx ssl port set. setting to random open high port"