How to Enable HTTP/2 on CWP7 – Centos Web Panel

HTTP/2 will make our applications faster, simpler, and more robust — a rare combination — by allowing us to undo many of the HTTP/1.1 workarounds previously done within our applications and address these concerns within the transport layer itself. Even better, it also opens up a number of entirely new opportunities to optimize our applications and improve performance!

How to Enable IPv6 on CWP Centos WebPanel

Apache HTTP to HTTPS htaccess redirect on CWP – Centos WebPanel

How to Enable HTTP/2 for Apache in CWP with mod_http2 module -NEW

The primary goals for HTTP/2 are to reduce latency by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push. To implement these requirements, there is a large supporting cast of other protocol enhancements, such as new flow control, error handling, and upgrade mechanisms, but these are the most important features that every web developer should understand and leverage in their applications.

HTTP/2 does not modify the application semantics of HTTP in any way. All the core concepts, such as HTTP methods, status codes, URIs, and header fields, remain in place. Instead, HTTP/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides all the complexity from our applications within the new framing layer. As a result, all existing applications can be delivered without modification.

In this tutorial we’ll cover how to enable HTTP/2 on CWP7 – CENTOS 7

Follow this steps to One by One :

On CWP you need to have Nginx + Apache or Nginx + Apache + Varnish installed and ensure SSL certs are installed for your domain names in order to enable HTTP/2, you can enable free SSL provided by Letsencryt too.

Step 1 :

Enable/install Nginx + Apache or Nginx + Apache + Varnish

Step 2 :

Navigate to

cd /etc/nginx/conf.d/vhosts/

Edit your site ssl config :

I’m using https://tut.mysterydata.com for testing purpose :

here you can see http 2 is not enabled tested with this site : https://tools.keycdn.com/http2-test


Now edit nginx vhost ssl config, how to find the ssl config for ssl is easy simply search “yourdoamin.com_ssl.conf” prefix at /etc/nginx/conf.d and ensure you have latest version of centos/rhel 7, you can update your os to latest version via “yum update

nano tut.mysterydata.com_ssl.conf

and replace/add this, compare the changes :

server {
listen 144.217.209.165:443;

to :

server {
listen 144.217.209.165:443 ssl http2;

add this line only : ssl http2;

then restart the nginx server :

service nginx restart

Congratulations you’ve now HTTP/2 enabled on CWP7 tested with this site : https://tools.keycdn.com/http2-test

Another Method :

This process will install HTTP/2 to all of your websites with ssl.

GO to and edit Nginx SSL template :

nano /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/nginx/default.stpl

FInd this line

listen %ip%:%nginx_port% %http2%;

And replace with this line :

listen %ip%:%nginx_port% ssl http2;

Save it and rebuild the VHost :

GO to CWP ADMIN >> Webserver Settings >> Select WebServers >> choose Nginx & Varnish & Apache (or any with NGINX) >> Save & Rebuild Configuration

that’s it you’re done.

Back to top button