#wss相关配置
location /wss
{
proxy_pass https://127.0.0.1:23481;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}
proxy_pass https://127.0.0.1:23481;这里注意使用https而不是http
否则会出现错误
stream_socket_enable_crypto(): SSL operation failed with code 1
SSL routines:SSL23_GET_CLIENT_HELLO:http request