The Web is changing and it should. HTTP 2.0 or HTTP/2 was released on 14
th May 2015 with many great features, which helps business and ultimately enhances the user experience.
A Little bit of background…
So as you can see HTTP/2.0 is a second major version of the HTTP protocol history. Some of the
goals for HTTP 2 are: –
Data compression of HTTP headers
Server pushes technologies
Loading page elements in parallel over a single TCP connection
All above made me think of two things –
Security & Optimization
So are you ready to implement
Well, if you are using
Apache or Nginx then you got to little wait as a supported version is yet to be released.
LiteSpeed is a first web server to support HTTP 2, which I will explain how to
install, enable & test it.
LiteSpeed is the
fourth largest web server and powering over 98% of HTTP/2 websites as I write.
OpenLiteSpeed is open source version of Lite Speed web server. HTTP/2 is supported in 1.3.11 and 1.48+ versions.
So in this guide, I will install 1.4.10 on Linux. There are two ways we can install – one by compiling the source code and second by their repository. I will walk you through both procedures.
Download OpenLiteSpeed 1.4.10
Downloadable is available on the
download page Transfer the downloaded file to the server where you wish to install
You can install them by using following commands
# yum install openssl openssl-devel gcc gcc-c++ pcre pcre-devel gcc autoconf expat-devel geoip-devel zlib-devel
Install OpenLiteSpeed – Using Source Code
Go to folder where you have openlitespeed-1.4.10.tgz
Extract it by using the following command
# gunzip -c openlitespeed-1.4.10.tgz | tar xvf –
It will create another folder in present working directory – openlitespeed-1.4.10
Go to openlitespeed-1.4.10
# cd openlitespeed-1.4.10
Compile it using following commands
# ./configure –enable-http2
# make install
It will take few minutes, and at the end, you will have confirmation on successfully installed.
[OK] The startup script has been successfully installed!
Installation finished, Enjoy!
Woho! You have installed LiteSpeed web server, and it’s time to enable HTTP/2.0.
Exciting? Let’s do it.
You need to enable HTTP/2.0 with WebAdmin Console, which is accessible using hostname:7080
Before we login into WebAdmin, need to change the credential. So here is how you can do it.
Go to /usr/lcoal/lsws/admin/misc
# cd /usr/lcoal/lsws/admin/misc
It will prompt to enter user/password and once done, will give you confirmation that it’s updated successfully.
Administrator's username/password is updated successfully!
Install OpenLiteSpeed – Using Repository
Add the repository in Linux/CentOS 6
# rpm -ivh
Install OpenLite using yum command
# yum install openlitespeed
It will take few seconds and will be installed under /usr/local/lsws
Login into WebAdmin
Go to Listeners >> SSL
Click on Edit for “Security & Features”
Select HTTP/2 and click on Save
Restart LiteSpeed. You can use a startup script to do so.
# /etc/init.d/lsws restart
Note: if SSL is not configured, then you need to configure it first.
So now, HTTP 2.0 is enabled and ready to test it.
Test if HTTP/2.0 is enabled
Enter the URL and test it
So you can see, it supports
I hope above guide helps you to install and enable
HTTP/2.0 in LiteSpeed web server.