Hello,
Aug 9 2023
# server1
nginx failed to start
nginx -t
nginx: [emerg] invalid value "0" in "http2" directive, it must be "on" or "off" in /etc/nginx/conf.d/default.conf:9
nginx: configuration file /etc/nginx/nginx.conf test failed
cpanel 112.0.5 on CloudLinux v8.8.0 STANDARD
ea-nginx-1.25.1-2.el8.cloudlinux.x86_64
# server2
cpanel 112.0.5 on CloudLinux v8.8.0 STANDARD
ea-nginx-1.25.1-1.el8.cloudlinux.1.x86_64
nginx config is ok
# fix
copy /usr/local/cpanel/scripts/ea-nginx from server2 to server1
whm -> NGINX® Manager -> Rebuild Configuration
nginx start ok
# diff
diff ea-nginx-server1 ea-nginx-server2
1012c1012
< my $http2 = _wants_http2();
---
> my $http2 = _wants_http2() ? 'on' : 'off';
1978c1978
< http2 => $global_config_data->{http2},
---
> http2 => $global_config_data->{http2} ? 'on' : 'off',
Kind regards,
Aug 9 2023
# server1
nginx failed to start
nginx -t
nginx: [emerg] invalid value "0" in "http2" directive, it must be "on" or "off" in /etc/nginx/conf.d/default.conf:9
nginx: configuration file /etc/nginx/nginx.conf test failed
cpanel 112.0.5 on CloudLinux v8.8.0 STANDARD
ea-nginx-1.25.1-2.el8.cloudlinux.x86_64
# server2
cpanel 112.0.5 on CloudLinux v8.8.0 STANDARD
ea-nginx-1.25.1-1.el8.cloudlinux.1.x86_64
nginx config is ok
# fix
copy /usr/local/cpanel/scripts/ea-nginx from server2 to server1
whm -> NGINX® Manager -> Rebuild Configuration
nginx start ok
# diff
diff ea-nginx-server1 ea-nginx-server2
1012c1012
< my $http2 = _wants_http2();
---
> my $http2 = _wants_http2() ? 'on' : 'off';
1978c1978
< http2 => $global_config_data->{http2},
---
> http2 => $global_config_data->{http2} ? 'on' : 'off',
Kind regards,
Last edited by a moderator: