@@ -156,26 +156,24 @@ sub feature_setup
156156 ' words' => [ &domain_server_names($d ) ] });
157157
158158 # Add listen on the correct IP and port
159- my @h2 = $config {' http2' } ? ( " http2" ) : ( );
160- if ($config {' listen_mode' }) {
159+ if ($config {' listen_mode' } eq ' 0' ) {
161160 # Just use port numbers
162161 push (@{$server -> {' members' }},
163162 { ' name' => ' listen' ,
164- ' words' => [ $d -> {' web_port' }, @h2 ] });
163+ ' words' => [ $d -> {' web_port' } ] });
165164 }
166165 else {
167166 # Use IP and port
168167 my $portstr = $d -> {' web_port' } == 80 ? ' '
169168 : ' :' .$d -> {' web_port' };
170169 push (@{$server -> {' members' }},
171170 { ' name' => ' listen' ,
172- ' words' => [ $d -> {' ip' }.$portstr , @h2 ] });
171+ ' words' => [ $d -> {' ip' }.$portstr ] });
173172 if ($d -> {' ip6' }) {
174173 push (@{$server -> {' members' }},
175174 { ' name' => ' listen' ,
176175 ' words' => [ ' [' .$d -> {' ip6' }.' ]' .$portstr ,
177- $d -> {' virt6' } ? ( ' default' ) : ( ),
178- @h2 ] });
176+ $d -> {' virt6' } ? ( ' default' ) : ( ) ] });
179177 }
180178 }
181179
@@ -187,7 +185,7 @@ sub feature_setup
187185 # Allow sensible index files
188186 push (@{$server -> {' members' }},
189187 { ' name' => ' index' ,
190- ' words' => [ ' index.html ' , ' index.htm ' , ' index.php ' ] });
188+ ' words' => [ ' index.php ' , ' index.html ' , ' index.htm ' ] });
191189
192190 # Add a location for the root
193191 # push(@{$server->{'members'}},
@@ -894,7 +892,7 @@ sub feature_validate
894892 $d -> {' web_port' } == 80 ||
895893 $l =~ / ^\Q $d ->{'ip'}\E :(\d +)$ / &&
896894 $d -> {' web_port' } == $1 );
897- $found ++ if ($l eq $d -> {' web_port' } && $config {' listen_mode' });
895+ $found ++ if ($l eq $d -> {' web_port' } && $config {' listen_mode' } eq ' 0 ' );
898896 }
899897 $found || return &text(' feat_evalidateip' ,
900898 $d -> {' ip' }, $d -> {' web_port' });
@@ -906,7 +904,7 @@ sub feature_validate
906904 $l =~ / ^\[\Q $d ->{'ip6'}\E\] :(\d +)$ / &&
907905 $d -> {' web_port' } == $1 );
908906 $found6 ++ if ($l eq $d -> {' web_port' } &&
909- $config {' listen_mode' });
907+ $config {' listen_mode' } eq ' 0 ' );
910908 }
911909 $found6 || return &text(' feat_evalidateip6' ,
912910 $d -> {' ip6' }, $d -> {' web_port' });
0 commit comments