Add Spdy functionality to Nginx _nginx

Source: Internet
Author: User
Tags openssl openssl version ssl certificate

I help the Association forum, has been using SSL access, but the ordinary https both slow and eat resources, and there is a protocol can be very convenient to solve this problem, that is the big Google invented the Spdy agreement. So, I also began to try to give their own forum to add Spdy protocol, the Web server I chose is nginx, in the past, Nginx did not have the built-in Spdy protocol, need to open the words to download the development version and then manually compile, very inconvenient. Loved is, the recent Nginx released 1.6 stable version, this version finally built the support of Spdy, but also the vast number of people I build the gospel Ah, I can not wait to add a Spdy agreement to the Forum support. First of all, explicitly open the premise of the Spdy agreement, the following three indispensable:

1.Openssl 1.0.1e or later
2. SSL certificate has been installed on the website
3.Nginx 1.6 Stable or 1.5Development
First check the OpenSSL version

CentOS 6 can use the following command

Copy Code code as follows:

[Root@do ~]# Rpm-q OpenSSL
openssl-1.0.1e-16.el6_5.14.i686

You can see that the CentOS 6 built-in OpenSSL is already up to the requirements, and if it is CentOS5 you need to manually upgrade Ubuntu, Debian and other distributions can check the version with the following command

Copy Code code as follows:

[Root@do ~]# OpenSSL version
OpenSSL 1.0.1e-fips Feb 2013

Check the Nginx version
Check the Nginx version using the following command

Copy Code code as follows:

[Root@do ~]# Nginx-v
Nginx version:nginx/1.6.0

Use the following command to see if the Nginx contains Spdy

Copy Code code as follows:

[root@do ~]# nginx-v |grep spdy
Nginx version:nginx/1.6.0
Built by GCC 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
TLS SNI Support Enabled
Configure arguments:--prefix=/etc/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf-- Error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx.pid- -lock-path=/var/run/nginx.lock--http-client-body-temp-path=/var/cache/nginx/client_temp--http-proxy-temp-path= /var/cache/nginx/proxy_temp--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp--http-uwsgi-temp-path=/var/ Cache/nginx/uwsgi_temp--http-scgi-temp-path=/var/cache/nginx/scgi_temp--user=nginx--group=nginx--with-http_ssl _module--with-http_realip_module--with-http_addition_module--with-http_sub_module--with-http_dav_module-- With-http_flv_module--with-http_mp4_module--with-http_gunzip_module--with-http_gzip_static_module--with-http_ Random_index_module--with-http_secure_link_module--with-http_stub_status_module--with-http_auth_request_module --with-mail--with-mail_ssl_module--with-file-aio--with-ipv6--with-http_spdy_module--with-cc-opt= '-O2-G-pipe-wp,-d_fortify_source=2-fexceptions-fstack-protector--param=ssp-buffer-size=4-m32-march=i386-mtune= Generic-fasynchronous-unwind-tables '

If you see –with-http_spdy_module, you are satisfied with the requirements. If you do not meet your requirements, please go to http://nginx.org/to download and install 1.6 stable

Open Spdy support for Nginx
Assuming that SSL support is already configured on the Nginx, opening spdy will be very simple to configure the following SSL

Copy Code code as follows:

Listen [::]:443 SSL;
Listen 443 SSL;

Change into

Copy Code code as follows:

Listen [::]:443 SSL Spdy;
Listen 443 SSL spdy;

and restart the Nginx service.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.