diff --git a/plugins/nginx-vhosts/post-deploy b/plugins/nginx-vhosts/post-deploy index 2b2650369..a8e00df89 100755 --- a/plugins/nginx-vhosts/post-deploy +++ b/plugins/nginx-vhosts/post-deploy @@ -3,7 +3,7 @@ set -e APP="$1"; PORT="$2" if [[ -f "$HOME/VHOST" ]]; then - hostname="${APP/\//-}.$(< "$HOME/VHOST")" + [[ "$APP" == *.* ]] && hostname="${APP/\//-}" || hostname="${APP/\//-}.$(< "$HOME/VHOST")" cat< $HOME/$APP/nginx.conf upstream $APP { server 127.0.0.1:$PORT; } server {