Skip to content

Instantly share code, notes, and snippets.

@virbo
Last active April 19, 2018 15:27
Show Gist options
  • Save virbo/17c61d0c097e3ec28b005ec00a2def97 to your computer and use it in GitHub Desktop.
Save virbo/17c61d0c097e3ec28b005ec00a2def97 to your computer and use it in GitHub Desktop.
Enable http2 on CWP

source: https://www.mysterydata.com/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!

[link]How to Enable IPv6 on CWP Centos WebPanel[/link]

[link]Apache HTTP to HTTPS htaccess redirect on CWP – Centos WebPanel[/link]

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment