mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user