Allow symlinks for SSL cert detection in nginx-vhosts post-deploy
This commit is contained in:
@@ -13,14 +13,14 @@ if [[ -f "$DOKKU_ROOT/VHOST" ]]; then
|
|||||||
hostname="${APP/\//-}.$VHOST"
|
hostname="${APP/\//-}.$VHOST"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "$SSL/server.crt" ]] && [[ -f "$SSL/server.key" ]]; then
|
if [[ -e "$SSL/server.crt" ]] && [[ -e "$SSL/server.key" ]]; then
|
||||||
SSL_INUSE="$SSL"
|
SSL_INUSE="$SSL"
|
||||||
SSL_DIRECTIVES=$(cat <<EOF
|
SSL_DIRECTIVES=$(cat <<EOF
|
||||||
ssl_certificate $SSL_INUSE/server.crt;
|
ssl_certificate $SSL_INUSE/server.crt;
|
||||||
ssl_certificate_key $SSL_INUSE/server.key;
|
ssl_certificate_key $SSL_INUSE/server.key;
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
elif [[ -f "$WILDCARD_SSL/server.crt" ]] && [[ -f "$WILDCARD_SSL/server.key" ]] && [[ $hostname = `openssl x509 -in $WILDCARD_SSL/server.crt -noout -subject | tr '/' '\n' | grep CN= | cut -c4-` ]]; then
|
elif [[ -e "$WILDCARD_SSL/server.crt" ]] && [[ -e "$WILDCARD_SSL/server.key" ]] && [[ $hostname = `openssl x509 -in $WILDCARD_SSL/server.crt -noout -subject | tr '/' '\n' | grep CN= | cut -c4-` ]]; then
|
||||||
SSL_INUSE="$WILDCARD_SSL"
|
SSL_INUSE="$WILDCARD_SSL"
|
||||||
SSL_DIRECTIVES=""
|
SSL_DIRECTIVES=""
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user