nginx反向代理 报错:Error during WebSocket handshake: Unexpected response code: 403
遇到nginx报错:websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403
server {
listen 6340;
location / {
proxy_pass http://web;
proxy_http_version 1.1; #Nginx在与Node后端通信时使用HTTP/1.1,是WebSockets所必需的
proxy_set_header Origin '';
proxy_set_header Upgrade $http_upgrade; #Nginx响应升级请求,当浏览器想要使用WebSocket时,该请求由HTTP启动
proxy_set_header Connection "Upgrade";
}
}
代理 TCP和UDP
stream {
upstream pptcp {
server 10.10.10.10:9994;
server 10.10.10.11:9994;
}
server {
listen 9994;
proxy_pass pptcp;
proxy_connect_timeout 10s;
proxy_timeout 3h;
}
upstream ppudp {
server 10.10.10.10:9995;
server 10.10.10.11:9995;
}
server {
listen 9995 udp;
proxy_pass ppudp;
proxy_connect_timeout 10s;
proxy_timeout 3h;
}
}
nginx反向代理 报错:Error during WebSocket handshake: Unexpected response code: 403的更多相关文章
- easyswoole报错:failed: Error during WebSocket handshake: Unexpected response code: 200
WebSocket connection to 'ws://www.xxxx.com/xxx/xx' failed: Error during WebSocket handshake: Unexpec ...
- WebSocket connection to,Error during WebSocket handshake: Unexpected response code: 404
使用标准的JSR 356注解时,需要使用tomcat 8.x版本,如果使用tomcat 7.x的版本,则需要继承WebSocketServlet,否则会报WebSocket connection to ...
- struts2+websocket报错:failed: Error during WebSocket handshake: Unexpected response code:404
最近把websocket集成进项目里面来,打开网页总是会遇到这样的错误. 网上说的原因有3种,但是都不适合我,但是也记录下. 1.struts2截拦掉了ws的请求.这种援用可以尝试把web.xml清空 ...
- Spring 整合WebSocket, Error during WebSocket handshake: Unexpected response code: 302 还有200的错误
springboot 集成websocket 及其简单,,,但是管理端使用的是Spring,原生配置,发生这个错误,,,302 被重定向了...我起的是本地locallhost,把ip换成 local ...
- WebSocket handshake: Unexpected response code: 404
在执行 http://www.cnblogs.com/best/p/5695570.html 提供的 websocket时候, 报错了 “WebSocket handshake: Unexpe ...
- nginx反向代理https访问502, nginx反向代理, 支持SNI的https回源,SNI源点,nginx反向代理报错
正常nginx配置了SSL是可以通过HTTPS访问后端的,但是对有配置SNI + https后端的支持有点麻烦. 编译安装nginx后,看一下是否支持SNI /usr/local/nginx/sbin ...
- nginx 反向代理报400错误与Host关系
转载自:https://blog.csdn.net/qq_22208737/article/details/80787396 如果后端真是的服务器设置有类似防盗链或者根据http请求头中的host字段 ...
- Nginx 反向代理报400错误解决方法!
如果后端真是的服务器设置有类似防盗链或者根据http请求头中的host字段来进行路由或判断功能的话,如果反向代理层的nginx不重写请求头中的host字段,将会导致请求失败,报400错误,解决办法: ...
- iOS开发——打包报错error: linker command failed with exit code 1
真机运行没问题,打包报错: clang: error: linker command failed with exit code 1 (use -v to see invocation) 原因:在Xc ...
随机推荐
- MyBatis框架的详解
一.MyBatis的介绍 在使用的时候,需要配置文件的方式告知框架需要的信息,多数会使用XML文件作为框架的配置文件. 框架都是由第三方提供的,提供的都是jar包.因此,使用框架前,必须将框架涉及的j ...
- ARM中断深入分析几点
ARM中断深入分析几点 1.程序发生中断后,是如何跳转到中断程序里面的? 2.执行完中断后,如何返回到原来被打断的地方接着执行呢? 3.ARM处理器的流水线结构对中断返回地址的计算有什么影响? 4.A ...
- SpringBoot 常用配置 静态资源访问配置/内置tomcat虚拟文件映射路径
Springboot 再模板引擎中引入Js等文件,出现服务器拒绝访问的错误,需要配置过滤器 静态资源访问配置 @Configuration @EnableWebMvc public class Sta ...
- bean标签解析与注册
protected void processBeanDefinition(Element ele, BeanDefinitionParserDelegate delegate) { BeanDefin ...
- redis 安装使用 & SpringBoot Redis配置
1.安装 https://www.cnblogs.com/dingguofeng/p/8709476.html https://www.runoob.com/redis/redis-keys.html ...
- 【JAVA】JSP+layui框架 静态表格转化成数据表格
<table lay-filter="demo" class="layui-table" id="excTable"> < ...
- sql基本常识[未完待续]
---------------------------------------------------------------------------------------------------- ...
- nginx 是如何分配 worker 进程连接数的
客户端连接过来后,多个空闲的进程,会竞争这个连接,很容易看到,这种竞争会导致不公平,如果某个进程得到 accept 的机会比较多,它的空闲连接很快就用完了,如果不提前做一些控制,当 accept 到一 ...
- Tomcat启动超时设置
Tomcat启动超时设置: 处理方法: 1. 在server中找到当前Tomcat双击. 2.在视图中进行修改.(如下图:)
- c# CryptoStream 类