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

by Sandeep B.

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 for testing purpose :

here you can see http 2 is not enabled tested with this site :

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 {

to :

server {
listen 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 :

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.

If this post helps you in any way please consider a donation

Donate with PayPal :


You may also like


dadi January 21, 2018 - 5:49 pm

thank mat.
I have search many page and found this article.
I can not find this easy tutorial in CWP forum. And i found it in your website.
Thank you so much.
You save my time alot.

Warm regards

sandy b. January 25, 2018 - 4:50 pm

thanks a lot for your kind words :)

Ben January 25, 2018 - 3:17 pm

I join @dadi with everything he wrote
Thank you for this article, this was very helpful!

sandy b. January 25, 2018 - 4:52 pm

I’m glad to know from you that it was helpful :)

John December 29, 2020 - 3:41 pm

Will this not be overwritten during a cwp update?

Sandeep B. December 29, 2020 - 4:46 pm

CWP also have now http2 template use that

David August 22, 2018 - 5:53 pm

Gee… that simple? Thanks a lot! Works like a charm!

Ferdosi Begum November 22, 2018 - 6:48 pm

Great Man!! Its working! Simple and easy CWP7 Tutorial ever!

Ananda Kumar July 5, 2021 - 1:59 pm

Will this article work today?

Daniel Sousa July 8, 2021 - 11:17 am

Already try that but not working.
Can help me?


Leave a Comment