The Web is changing and it should. HTTP 2.0 or HTTP/2 was released on 14th 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 HTTP 2?
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
- OpenSSL 1.0.1+
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 # 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
- Execute admpass.sh
- 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
- 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
- Go to HTTP/2 Test
- Enter the URL and test it
So you can see, it supports HTTP/2.0
I hope above guide helps you to install and enable HTTP/2.0 in LiteSpeed web server.
More great readings on Sysadmin
Looking For Traceroute on RHEL 8? Try TracepathAbhishek Nair on June 14, 2022
6 Best Switch Port Monitoring ToolsDurga Prasad Acharya on June 12, 2022
Windows 10/11 Random Shutdown: How to Find the CauseHitesh Sant on May 30, 2022
7 Best Server Configuration Monitoring and Auditing ToolsTalha Khalid on May 28, 2022
8 Best FTP Server Software for Windows for Secure TransferSatish Shethi on May 24, 2022
OSI Model Layers: An Introduction GuideAmrita Pathak on May 13, 2022
Join Geekflare Newsletter
Every week we share trending articles and tools in our newsletter. More than 10,000 people enjoy reading, and you will love it too.