Linux Mint + Nginx 1.5.11搭建SSL/HTTPS/SPDY服务器

Apache搭建的SPDY服务器(Linux Mint + Apache2.2搭建SSL/HTTPS/SPDY服务器)很不爽,因为Apache只能用2.2版本,SPDY也只支持到3,不支持3.1。所以用Nginx好些。

用以下脚本安装:

sudo apt-get install openssl libssl-dev
wget http://nginx.org/download/nginx-1.5.11.tar.gz
tar zxvf nginx-1.5.11.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
tar zxvf zlib-1.2.8.tar.gz
cd nginx-1.5.11
./configure --with-http_ssl_module --with-zlib=../zlib-1.2.8 --with-http_spdy_module
sudo make install

然后打开/usr/local/nginx/conf/nginx.conf

搜索HTTPS server,把下面的行全部取消注释,并为listen参数加上spdy,SSL证书可以填Apache的,或者自己创建。为了让Wireshark能截包,ssl_ciphers可以改成RSA。

    # HTTPS server
    #
    server {
        listen       443 ssl spdy;
        server_name  localhost;

        ssl_certificate      /etc/ssl/certs/ssl-cert-snakeoil.pem;
        ssl_certificate_key  /etc/ssl/private/ssl-cert-snakeoil.key;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;

        #ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_ciphers  RSA;
        ssl_prefer_server_ciphers  on;

        location / {
            root   /home/liuhx/xtp/writable/www;
            index  index.html index.htm;
        }
    }


启动:

sudo /usr/local/nginx/sbin/nginx


注:Apache使用的mod_spdy支持server push,nginx还不支持。


参考:

http://dev.meettea.com/show-110-1.html

http://nginx.org/en/docs/http/ngx_http_spdy_module.html

http://nginx.org/en/docs/configure.html


转载请注明出处:http://blog.csdn.net/hursing

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hursing

来一个五羊香芋甜筒~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值