nginx搭建https+http2
2018-12-29 10:41
471 查看
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gz tar zxvf OpenSSL_1_1_1a.tar.gz cd nginx-1.15.8/ #通过--with-http_v2_module 打包http2 --with-openssl指定openssl目录 ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_v2_module --with-openssl=../openssl-OpenSSL_1_1_1a make -j2 sudo make install #最后在nginx conf server下配置 listen 443 ssl http2; server_name localhost; ssl_certificate_key /home/anfang/Downloads/cert/key.pem; ssl_certificate /home/anfang/Downloads/cert/cert.pem; openssl genrsa -out key.pem 2048 openssl req -new -x509 -sha256 -key key.pem \ -out cert.pem -days 36500 \ -subj /C=CN/ST=Shanghai/L=Songjiang/O=ztgame/OU=tech/CN=mydomain.ztgame.com/emailAddress=myname@ztgame.com openssl x509 -in cert.pem -noout -text
相关文章推荐
- 阿里云通过nginx,docker完美搭建Ngrok服务器(http,https)
- 详解nginx同一端口监听多个域名和同时监听http与https
- nginx服务器http重定向到https的正确写法
- Varnish高性能开源HTTP加速器:Varnish Nginx和Varnish Apache搭建配置
- Nginx 配置https 开启ssl 同时支持http
- Nginx搭建HTTPS服务器和强制使用HTTPS访问的方法
- Nginx: http 跳转 https
- Nginx的https配置记录以及http强制跳转到https的方法梳理
- [置顶] NGINX 配置 SSL 证书 搭建 HTTPS 网站
- nginx配置https并强制http自动跳转到https
- 利用nginx搭建http和rtmp协议的流媒体服务器
- Nginx实现根据域名http、https分发配置示例
- nginx 搭建http协议拖动播放 FLV 视频播放服务器
- 【nginx源码学习与运用 九】搭建第一个nginx的http模块
- 配置nginx使用http和https访问
- nginx https配置详解,linxu环境nginx下http升级到https——linux安装web服务器17
- 使用nginx搭建https服务器
- https,https的本地测试环境搭建,asp.net结合https的代码实现,http网站转换成https网站之后遇到的问题
- 使用nginx搭建https服务器(转)
- Nginx搭建HTTP正向代理服务器