ENABLING HTTP/2 FOR PLESK

Tammy PorterSr. Digital Marketing Manager
Published:
Updated:
Good news! Plesk 12.5 (with update #28 and above) now includes support for HTTP/2. This is a major update to HTTP1.1, which is over 15 years old. Read below to learn how to enable HTTP/2 on your Media Temple DV with Plesk.

There are a number of reasons why the original HTTP required revision.  Though HTTP/1.1 has served the Web well for more than 15 years, its age began to show.  Page loading is more resource intensive than ever and ultimately inefficient with HTTP/1.1 due to the need to use multiple TCP connections to issue parallel requests - this causes TCP congestion and high overhead, not to mention performance problems. Major changes with HTTP/2 allow for a single TCP connection for parallelism, as well as header compression to reduce overhead.


Use this guide to configure your Plesk-managed sites to use HTTP/2.


Important Notes:

  • Nginx versions 1.9.14+ support HTTP/2.
  • HTTP/2 will only work with an active SSL. In a push to make the internet more secure, no browser currently supports HTTP/2 over an unencrypted network.


Google Chrome: A policy update for the Chrome web browser that was released in May/2016 removes support for NPN. This means that many Chrome users are seeing sites default back to HTTP/1. For Media Temple DVs managed with Plesk, support for HTTP/2 over Chrome is largely dictated by which version of CentOS you are using.

  • CentOS 6 - OpenSSL has not been updated in NGINX on Plesk for Centos 6. HTTP/2 can NOT be used in Google Chrome for CentOS 6 with Plesk at this time.
  • CentOS 7 - The latest micro-update of Plesk on CentOS 7 has OpenSSL 1.0.2h. Ensure that HTTP/2 continues working for Chrome users by updating to the latest version of Plesk.


STEPS FOR ENABLING HTTP/2

1. Begin by making sure that you're using Plesk 12.5 (update #28 and above) and that it's updated. To update Plesk, use the update tool found in Tools & Settings >> Updates and Upgrades.

 


2. If you haven't done so, purchase and install an SSL. An SSL significantly increases the security of your site, and all browsers currently require one when using HTTP/2. You may also easily install a free SSL using the Let's Encrypt extension for Plesk. Instructions are found here. Sites that do not have an SSL enabled will default to using HTTP1.1. Media Temple SSL certificates offer a one-click domain-ownership verification option for domains using Media Temple DNS servers and also provide a one-click installation option for Plesk.


3. Verify that your version of Nginx is 1.9.14 or later and that it is running.

  • Navigate to Tools & Services >> Server Components. Scroll until you see Nginx and verify that the version is compatible with HTTP/2. This should be fine as long as you are using an up-to-date version of Plesk 12.5.
  • Navigate to Tools & Settings >> Service Management. Verify that Nginx is running. There should be a green check next to Reverse Proxy Server. If Nginx has been stopped, use the green arrow to the right of the service list to start it.                                                                                                              


4. SSH to your server and update the Nginx template. You'll need to use an editor. Help with using SSH may be found here. If you are unfamiliar with using BASH text editors, this article can help.  

  • SSH to your server and execute the following command. Any other editor such as vi or nano will also work fine:
vim /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php
  • Next, identify the following lines:
listen escapedAddress . ':' . $OPT['frontendPort'] . ($OPT['default'] ? ' default_server' : '') . ($OPT['ssl'] ? ' ssl ' : '') ?>;  
  • Replace with the following:
listen escapedAddress . ':' . $OPT['frontendPort'] . ($OPT['default'] ? ' default_server' : '') . ($OPT['ssl'] ? ' ssl http2' : '') ?>; 
  • save and quit
:wq
  • Update the Nginx template and restart the web server.
/usr/local/psa/admin/bin/httpdmng --reconfigure-all service nginx restart 


Your sites should now be using HTTP/2. If you have any questions or concerns, please feel free to contact our award winning 24/7 support team.  For more tips, visit Media Temple's Support Community.


If you haven't already ordered your new DV server from Media Temple, click here to do that now.


1
1,608 Views

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.