Skip to content

Commit 915f5b5

Browse files
committed
Merge branch 'master' of github.com:virtualmin/virtualmin-nginx
2 parents b14e728 + 12a821d commit 915f5b5

File tree

8 files changed

+14
-16
lines changed

8 files changed

+14
-16
lines changed

config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ stop_cmd=killall nginx
55
apply_cmd=killall nginx ; sleep 1 ; /usr/local/nginx/sbin/nginx >/dev/null 2>&1 </dev/null &
66
child_procs=4
77
php_socket=1
8-
listen_mode=0
8+
listen_mode=1
99
http2=0

config-CentOS-Linux-7.0-ALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ stop_cmd=systemctl stop nginx
55
apply_cmd=systemctl restart nginx
66
child_procs=4
77
php_socket=1
8-
listen_mode=0
8+
listen_mode=1
99
http2=0

config-Redhat-Enterprise-Linux-7.0-ALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ stop_cmd=service nginx stop
55
apply_cmd=service nginx restart
66
child_procs=4
77
php_socket=1
8-
listen_mode=0
8+
listen_mode=1
99
http2=0

config-Scientific-Linux-7.0-ALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ stop_cmd=service nginx stop
55
apply_cmd=service nginx restart
66
child_procs=4
77
php_socket=1
8-
listen_mode=0
8+
listen_mode=1
99
http2=0

config-debian-linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ add_to=/etc/nginx/sites-available
77
add_link=/etc/nginx/sites-enabled
88
child_procs=4
99
php_socket=1
10-
listen_mode=0
10+
listen_mode=1
1111
http2=0

config-redhat-linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ stop_cmd=/etc/init.d/nginx stop
55
apply_cmd=/etc/init.d/nginx restart
66
child_procs=4
77
php_socket=1
8-
listen_mode=0
8+
listen_mode=1
99
http2=0

module.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
desc=Nginx Webserver
22
category=servers
3-
version=2.18
3+
version=2.19
44
readonly=1

virtual_feature.pl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)