To enable http2, just add http2 text at below lines of nginx virtual host file path /etc/nginx/sites-available/
listen [::]:443 ssl ipv6only=on http2;
listen 443 ssl http2;
After saving it reload the nginx server
sudo service nginx reload
Check http/2 enabled or not from here: https://http2.pro/