Enable SPDY with NGINX on Centos 6 Servers

The SPDY protocol has been created by Google to load HTTPS pages faster and improving web security.
It will work only when you have running site with SSL.

The test begins: The SPDY NGINX module isn't installed by default, so we have to update NGINX on the server to have it. Yeah before update we can check.

nginx -V

Selection_004

  • So first  let's update Nginx with SPDY plugin.
  • As I am using Centos 6
  • You install the Epel repository by downloading the appropriate RPM package for your system and installing it. 
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

SPYD2

For other Linux version's Click here

rpm -Uvh nginx-release-centos-6-0.el6.ngx.noarch.rpm

Selection_006

  • To Install Nginx, Open termianl and type in:
yum install nginx

Selection_007

  • Now Nginx is compatiable with spdy module.

Selection_008

  • we got a newer version of NGINX and the required module installed, we can go ahead and enable SPDY on the currentlyrunning domain.

  • Add below content in your configuration file 
vim /etc/nginx/conf.d/mylinuxtips.info
 listen     443 ssl spdy;
 spdy_headers_comp 9;

        ssl_session_cache shared:SSL:20m;
        ssl_session_timeout 10m;

        ssl_prefer_server_ciphers On;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;

        add_header Strict-Transport-Security "max-age=31536000";

Selection_010

  • Let's check is it working fine on 

http://spdycheck.org/

 

One Response to Enable SPDY with NGINX on Centos 6 Servers

  1. For this to work, the easiest setup is to install Nginx from the official repositories . In the case of CentOS 6, that would be the following simple steps.

Leave a Reply

Your email address will not be published. Required fields are marked *