From eaaf0e41c2413c871af6d0ff338cf340f747a8a1 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 27 Apr 2026 15:43:33 -0400 Subject: [PATCH] fix: clear auto-detected port maps when re-enabling vhost Re-enabling vhost on an app that was previously deployed with no global VHOST left the auto-assigned random high port behind in the ports plugin's `map-detected` property, so nginx kept listening on that port and the new catch-all default vhost rejected requests for the app's own domain on port 80. --- plugins/nginx-vhosts/pre-enable-vhost | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/nginx-vhosts/pre-enable-vhost b/plugins/nginx-vhosts/pre-enable-vhost index a64365d66..c3abb8439 100755 --- a/plugins/nginx-vhosts/pre-enable-vhost +++ b/plugins/nginx-vhosts/pre-enable-vhost @@ -24,6 +24,9 @@ trigger-nginx-vhosts-pre-enable-vhost() { fn-plugin-property-delete "proxy" "$APP" "proxy-ssl-port" fi + # clear auto-detected port maps so they get recomputed for vhost mode + fn-plugin-property-delete "ports" "$APP" "map-detected" + # clear ports if there is a mapping starting with http:80 or https:443 local PORT_MAPS=$(plugn trigger ports-get "$APP") for PORT_MAP in $PORT_MAPS; do