From 75b06bb02e47c26e80088ed9147f9c59bb5db5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guitaut?= Date: Tue, 6 Oct 2015 23:12:24 +0200 Subject: [PATCH] Fix nginx configuration for SSL When generating config for SSL vhost, configuration for non ssl vhost was always added (not the redirect one). This should fix the issue. --- 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 dd441d75d..b7d2b1913 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -245,8 +245,8 @@ EOF if [[ -n "$NONSSL_VHOSTS" ]]; then NOSSL_SERVER_NAME=$(echo $NONSSL_VHOSTS | tr '\n' ' ') xargs -i echo "-----> Configuring {}..." <<< "$NONSSL_VHOSTS" + eval "cat <<< \"$(< $NGINX_TEMPLATE)\" >> $NGINX_CONF" fi - eval "cat <<< \"$(< $NGINX_TEMPLATE)\" >> $NGINX_CONF" if [[ "$(is_app_vhost_enabled $APP)" == "false" ]] || ([[ -z "$NONSSL_VHOSTS" ]] && [[ -z "$SSL_VHOSTS" ]]); then sed --in-place -n -e '/^.*server_name.*$/!p' $NGINX_CONF fi