国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > Nginx > 正文

為Nginx添加SPDY功能

2024-08-30 12:26:50
字體:
供稿:網(wǎng)友

本人幫協(xié)會(huì)搭的論壇,一直是使用ssl訪問的,但是普通的https既慢又吃資源,而有個(gè)協(xié)議可以很方便的解決這個(gè)問題,那就是大Google發(fā)明的SPDY協(xié)議。所以,我也開始嘗試著給自己的論壇加上SPDY協(xié)議,WEB服務(wù)器本人選擇的是nginx,在過去,Nginx并沒有內(nèi)置SPDY協(xié)議,需要打開的話還要下載開發(fā)版然后手動(dòng)編譯,很不方便。喜聞樂見的是,最近Nginx發(fā)布了1.6穩(wěn)定版,這個(gè)版本終于內(nèi)置了SPDY的支持,也是我等廣大建站人員的福音啊,我也就迫不及待的給論壇加上了SPDY協(xié)議支持了。 首先明確打開SPDY協(xié)議的前提,以下三個(gè)缺一不可:

1.Openssl 1.0.1e 或更高版本
2.網(wǎng)站已經(jīng)安裝了SSL證書
3.Nginx 1.6 stable 或者 1.5Development
首先檢查Openssl的版本

CentOS 6 可以使用以下命令

代碼如下:
[root@do ~]# rpm -q openssl
openssl-1.0.1e-16.el6_5.14.i686

可以看到CentOS 6 內(nèi)置的Openssl已經(jīng)是滿足要求了,如果是CentOS5的話就需要手動(dòng)升級(jí)了 Ubuntu , Debian 和其他發(fā)行版可以用以下命令檢查版本

代碼如下:
[root@do ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

檢查 Nginx 的版本
使用以下命令檢查Nginx的版本

代碼如下:
[root@do ~]# nginx -v
nginx version: nginx/1.6.0

用以下命令查看Nginx里是否包含了SPDY

代碼如下:
[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'

如果看到–with-http_spdy_module 就說明是滿足要求的。 如果沒有滿足要求,請(qǐng)去 http://nginx.org/ 下載安裝1.6 stable

打開Nginx的SPDY支持
假設(shè)已經(jīng)在Nginx上配置了SSL的支持,那么打開SPDY就會(huì)非常的簡(jiǎn)單 把以下SSL的配置

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 秦安县| 鄱阳县| 香港| 青阳县| 丹东市| 和硕县| 武义县| 高雄县| 宜章县| 蕉岭县| 岫岩| 长治市| 徐水县| 昭苏县| 惠来县| 阿克陶县| 新源县| 惠州市| 衡南县| 阿拉善盟| 清水县| 油尖旺区| 长垣县| 博乐市| 永胜县| 舞钢市| 新田县| 晋江市| 万年县| 涞源县| 永善县| 博白县| 武乡县| 随州市| 宣汉县| 保德县| 平凉市| 安康市| 田东县| 荃湾区| 随州市|