From 6963f7e26a2e94cad4caafea7f5ab07bc46b3e73 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Sat, 13 Mar 2021 16:45:03 +0300 Subject: [PATCH] Fix listen mode logic https://github.com/virtualmin/virtualmin-nginx/commit/689c5e58f88410d97d7e5505a484481a2560dd93 --- virtual_feature.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index c584273..c2544f4 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -224,7 +224,7 @@ sub feature_setup push(@sslopts, 'ssl'); } push(@sslopts, "http2") if ($virtualmin_nginx::config{'http2'}); -if ($virtualmin_nginx::config{'listen_mode'}) { +if ($virtualmin_nginx::config{'listen_mode'} eq '0') { # Listen on all IPs if (!$old_ip4 && !$old_ip6) { push(@listen, { 'name' => 'listen', @@ -496,7 +496,7 @@ sub feature_validate $l =~ /^\Q$d->{'ip'}\E:(\d+)$/ && $d->{'web_sslport'} == $1); $found++ if ($l eq $d->{'web_sslport'} && - $virtualmin_nginx::config{'listen_mode'}); + $virtualmin_nginx::config{'listen_mode'} eq '0'); } $found || return &virtualmin_nginx::text('feat_evalidateip', $d->{'ip'}, $d->{'web_sslport'}); @@ -508,7 +508,7 @@ sub feature_validate $l =~ /^\[\Q$d->{'ip6'}\E\]:(\d+)$/ && $d->{'web_sslport'} == $1); $found6++ if ($l eq $d->{'web_sslport'} && - $virtualmin_nginx::config{'listen_mode'}); + $virtualmin_nginx::config{'listen_mode'} eq '0'); } $found6 || return &virtualmin_nginx::text('feat_evalidateip6', $d->{'ip6'}, $d->{'web_sslport'});