尝鲜 部署 Nginx Quic

一、介绍

Nginx正在QUIC分支上开发基于QUIC协议版本(所谓的HTTP3)的nginx,并且最近出了尝鲜版。

下面介绍部署方法。

二、操作说明

  • 1、下载 boringssl
  • 2、下载 Nginx 并编译安装

2.1、boringssl

BoringSSL 是由谷歌开发,从 OpenSSL 中分离的一个分支。

## 创建目录
$ mkdir ~/NginxWithQuic
$ cd ~/NginxWithQuic

## 下载代码
$ git clone https://github.com/google/boringssl.git

## 编译代码
$ cd boringssl
$ mkdir build
$ cd build
$ cmake ..
$ make

2.2、Nginx

cd ~/NginxWithQuic

## 下载代码
$ hg clone -b quic https://hg.nginx.org/nginx-quic
$ cd nginx-quic
## 配置
## 可以自定义目录,参数可以通过 ./auto/configure --help 查看
$ ./auto/configure --with-debug --with-http_v3_module \
      --with-cc-opt="-I../boringssl/include" \
      --with-ld-opt="-L../boringssl/build/ssl \
      -L../boringssl/build/crypto"
$ make
## 安装
$ sudo make install

也可以去直接下载压缩包:nginx-quic-quic.tar.gz

使用

进入目录 /usr/local/nginx 自行修改配置、启动服务。

/usr/local/nginx

➜  tree /usr/local/nginx                       
nginx
├── conf
│   ├── fastcgi.conf
│   ├── fastcgi.conf.default
│   ├── fastcgi_params
│   ├── fastcgi_params.default
│   ├── koi-utf
│   ├── koi-win
│   ├── mime.types
│   ├── mime.types.default
│   ├── nginx.conf
│   ├── nginx.conf.default
│   ├── scgi_params
│   ├── scgi_params.default
│   ├── uwsgi_params
│   ├── uwsgi_params.default
│   └── win-utf
├── html
│   ├── 50x.html
│   └── index.html
├── logs
└── sbin
    └── nginx

4 directories, 18 files

参考资料及附录


本文由 qingchuwudi 译制或原创,除非另有声明,在不与原著版权冲突的前提下,本作品采用署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 进行许可。

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值