b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

websocket与socket关系 nginx 代理 wss https for 微信小程序

电脑杂谈  发布时间:2018-02-15 20:08:39  来源:网络整理

websocket与socket关系_spring websocket_websocket协议

websocket与socket关系websocket与socket关系

环境:ubuntu + nginx?? + php-fpm??

主要修改nginx 的default 文件

map $http_upgrade $connection_upgrade {

?? ?? default upgrade;

?? ?? '' close;

}

upstream websocket {

?? ?? server :8282;?? //websocket 的8282端口

}

server {

listen?? ?? ?? ??443;

server_name?? ;

ssl on;

ssl_certificate /usr/local/apache/conf/1_; //证书路径

websocket与socket关系_websocket协议_spring websocket

ssl_certificate_key /usr/local/apache/conf/2_;??//证书路径

ssl_session_timeout 5m;

ssl_session_cache shared:SSL:50m;

ssl_protocols TLSV1.1 TLSV1.2 SSLv2 SSLv3;

ssl_ciphers ALL:!ADH:!EXPORT56:R+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

ssl_prefer_server_ciphers?? on;

root /var/www/html;

index index.php index.html index.htm;

location / {

?? ?? ?? ?? ??try_files $uri $uri/ =404;

}

location /wss{

?? ?? ?? ??proxy_pass ;?? ??# 代理到上面的地址去

?? ?? ?? ??proxy_http_version 1.1;

spring websocket_websocket与socket关系_websocket协议

?? ?? ?? ??proxy_set_header Upgrade $http_upgrade;

?? ?? ?? ??proxy_set_header Connection "Upgrade";

}

location ~ \.php$ {

?? ?? ?? ?? include snippets/fastcgi-php.conf;

?? ?? ?? ?? fastcgi_pass unix:/run/php/php7.0-fpm.sock;

?? ?? }

location ~ /\.ht {

?? ?? ?? ?? ?? ?? ?? ?? deny all;

?? ?? ?? ?? }

}

https?? https://xxx.cn;

websocket?? wss://xxx.cn/wws;

实现了根据路由转发


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-79413-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 徐正彦
        徐正彦

        真想开打就是误国呢

      • 廖杨
        廖杨

        好想去哎谁让我是个学生党呢凡凡

      热点图片
      拼命载入中...