本人幫協(xié)會搭的論壇,一直是使用ssl訪問的,但是普通的https既慢又吃資源,而有個協(xié)議可以很方便的解決這個問題,那就是大Google發(fā)明的SPDY協(xié)議。所以,我也開始嘗試著給自己的論壇加上SPDY協(xié)議,WEB服務(wù)器本人選擇的是nginx,在過去,Nginx并沒有內(nèi)置SPDY協(xié)議,需要打開的話還要下載開發(fā)版然后手動編譯,很不方便。喜聞樂見的是,最近Nginx發(fā)布了1.6穩(wěn)定版,這個版本終于內(nèi)置了SPDY的支持,也是我等廣大建站人員的福音啊,我也就迫不及待的給論壇加上了SPDY協(xié)議支持了。 首先明確打開SPDY協(xié)議的前提,以下三個缺一不可:
1.Openssl 1.0.1e 或更高版本
2.網(wǎng)站已經(jīng)安裝了SSL證書
3.Nginx 1.6 stable 或者 1.5Development
首先檢查Openssl的版本
CentOS 6 可以使用以下命令
復(fù)制代碼 代碼如下:
[root@do ~]# rpm -q openssl
openssl-1.0.1e-16.el6_5.14.i686
可以看到CentOS 6 內(nèi)置的Openssl已經(jīng)是滿足要求了,如果是CentOS5的話就需要手動升級了 Ubuntu , Debian 和其他發(fā)行版可以用以下命令檢查版本
復(fù)制代碼 代碼如下:
[root@do ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
檢查 Nginx 的版本
使用以下命令檢查Nginx的版本
復(fù)制代碼 代碼如下:
[root@do ~]# nginx -v
nginx version: nginx/1.6.0
用以下命令查看Nginx里是否包含了SPDY
復(fù)制代碼 代碼如下:
[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'
如果看到 主站蜘蛛池模板: 文昌市| 辛集市| 新郑市| 福清市| 衡南县| 遂平县| 临漳县| 化州市| 盐城市| 镇巴县| 平和县| 乌兰浩特市| 绍兴县| 宜阳县| 梅州市| 平远县| 石台县| 海林市| 铜山县| 古交市| 贵德县| 若尔盖县| 达州市| 肇东市| 嘉义县| 辰溪县| 文成县| 永胜县| 临安市| 湖州市| 高唐县| 冀州市| 桑植县| 前郭尔| 旺苍县| 海原县| 剑阁县| 普兰店市| 固始县| 宁都县| 南昌市|