Skip to content

Commit

Permalink
Fix listen mode logic virtualmin/virtualmin-nginx@689c5e5
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Mar 13, 2021
1 parent 06751ff commit 6963f7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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'});
Expand All @@ -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'});
Expand Down

0 comments on commit 6963f7e

Please sign in to comment.