In Progress [CPANEL-37171] - Could not enable http2

devinh

Member
Sep 22, 2018
14
0
1
India
cPanel Access Level
Root Administrator
using v96.0.9 WHM, Apache Apache 2.4, PHP 7.1, PHP 7.4 and mpm_event with NGINX enabled, in order to activate http2
I enabled mod_http2 via easyapache and restarted, but still http2 not activated, checked in browser and online testing tools such as HTTP/2 Test - Verify HTTP/2 Support | KeyCDN Tools result is HTTP/2 protocol is not supported and
ALPN extension is not supported

how to fix ? can't enable http2 while using NGINX, Pls let me know how to fix...
 

sahostking

Well-Known Member
May 15, 2012
403
29
78
Cape Town, South Africa
cPanel Access Level
Root Administrator
Twitter
I followed an article from cPanel that helped.

Procedure
To enable this globally, add a new file ending in .conf such as http2.conf to the Nginx configuration folder located in /etc/nginx/conf.d and add the following contents.



server {

listen 443 ssl http2;
listen [::]:443 ssl http2;

}


Save the file and verify the Nginx configuration. Then, restart Nginx as well as PHP-FPM.

nginx -t

/scripts/restartsrv_nginx ; /scripts/restartsrv_apache_php_fpm

I then checked my file:
tail -f /var/log/nginx/access.log

and it showed:

HTTP/2.0

Even gtmetrix reported all is good now with http2 :)