zoukankan      html  css  js  c++  java
  • 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;
        }
      }
    
  • 相关阅读:
    Substrate 为区块链创新而来
    跨链资产原子转移工具包 Decred atomicswap
    我的友情链接
    我的友情链接
    我的友情链接
    我的友情链接
    我的友情链接
    我的友情链接
    我的友情链接
    我的友情链接
  • 原文地址:https://www.cnblogs.com/fan-gx/p/nginx.html
Copyright © 2011-2022 走看看