博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
《亲测》nginx webscoket ssl conf配置示例
阅读量:6219 次
发布时间:2019-06-21

本文共 1805 字,大约阅读时间需要 6 分钟。

非crt证书,用的pem,其中 http://localhost:5003 是你要转发到的站点网址

配置的就是

 

server {    listen 80;    server_name smarthome.yingxiaobu.com;### ssl 配置开始 ###        listen 443 ssl;        ssl_certificate /etc/nginx/conf.d/ssl443/ssl/yingxiaobu.com/fullchain.pem;        ssl_certificate_key /etc/nginx/conf.d/ssl443/ssl/yingxiaobu.com/privkey.pem;        ssl_session_timeout 1d;        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';        ssl_prefer_server_ciphers on;        #ssl_dhparam /etc/ssl/certs/dhparam.pem;        ssl_session_cache shared:SSL:50m;        ssl_stapling on;        ssl_stapling_verify on;        add_header Strict-Transport-Security max-age=15768000; ### SSL 配置结束 #####    location / {        proxy_pass http://localhost:5003;        proxy_http_version 1.1;        proxy_set_header Upgrade $http_upgrade;        proxy_set_header Connection keep-alive;        proxy_set_header Host $host;        proxy_cache_bypass $http_upgrade;### websocket开始       proxy_set_header Connection "upgrade";       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;### websocket结束    }}

 

转载地址:http://nvoja.baihongyu.com/

你可能感兴趣的文章
UVA 489 Hangman Judge
查看>>
nuxt https
查看>>
Linux运维之系统性能---vmstat工具分析内存的瓶颈
查看>>
(转) android UI进阶之布局的优化(二)
查看>>
PHP Strict standards:Declaration of … should be compatible with that of…(转)
查看>>
打卡2
查看>>
js实现3D切换效果
查看>>
西安拟制定羊肉泡馍肉夹馍制作标准
查看>>
对Java平台的理解
查看>>
JavaWeb网上图书商城完整项目--过滤器解决中文乱码
查看>>
图片加水印帮助类
查看>>
计算机中的单位总结
查看>>
Java对象声明时:new与null的区别
查看>>
[Android] 华为荣耀2制作fastboot线刷包[海思平台]
查看>>
综合: Java 对象初始化过程
查看>>
poj 2540 Hotter Colder(极角计算半平面交)
查看>>
自己整的QQ,新浪第三方登录
查看>>
入门视频采集与处理(显示YUV数据)
查看>>
NASA的CTO——开源软件使我们诚实
查看>>
SOJ - 11512
查看>>