File manager - Edit - /usr/local/lswsbak/docs/zh-CN/VHWebSocket_Help.html
Back
<!DOCTYPE html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>OpenLiteSpeed Users' Manual - 网络套接字代理</title> <meta name="description" content="OpenLiteSpeed Users' Manual - 网络套接字代理." /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="robots" content="noindex"> <link rel="shortcut icon" href="../img/favicon.ico" /> <link rel="stylesheet" type="text/css" href="../css/hdoc.css"> </head> <body> <div class="pagewrapper clearfix"><aside class="sidetree ls-col-1-5"> <figure> <img src="img/ols_logo.svg" alt="openlitespeed logo" width="150px"/> </figure> <h2 class="ls-text-thin"> OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a> </h2> <h3 class="ls-text-muted">Version 1.8 — Rev. 3</h3> <hr/> <div> <ul> <li><a href="license.html">License</a></li> <li><a href="intro.html">Introduction</a></li> <li><a href="install.html">Installation</a></li> <li> <a href="admin.html">Administration</a> <ul class="level2"> <li><a href="ServerStat_Help.html">Service Manager</a></li> <li><a href="Real_Time_Stats_Help.html">Real-Time Stats</a></li> </ul> </li> <li><a href="security.html">Security</a></li> <li> <a href="config.html">Configuration</a> <ul class="level2"> <li><a href="ServGeneral_Help.html">Server General</a></li> <li><a href="ServLog_Help.html">Server Log</a></li> <li><a href="ServTuning_Help.html">Server Tuning</a></li> <li><a href="ServSecurity_Help.html">Server Security</a></li> <li><a href="ExtApp_Help.html">External Apps</a></li> <ul class="level3"> <li><a href="External_FCGI.html">Fast CGI App</a></li> <li><a href="External_FCGI_Auth.html">Fast CGI Authorizer</a></li> <li><a href="External_LSAPI.html">LSAPI App</a></li> <li><a href="External_Servlet.html">Servlet Engine</a></li> <li><a href="External_WS.html">Web Server</a></li> <li><a href="External_PL.html">Piped logger</a></li> <li><a href="External_LB.html">Load Balancer</a></li> </ul> <li><a href="ScriptHandler_Help.html">Script Handler</a></li> <li><a href="App_Server_Help.html">App Server Settings</a></li> <li><a href="Module_Help.html">Module Configuration</a></li> <li><a href="Listeners_General_Help.html">Listener General</a></li> <li><a href="Listeners_SSL_Help.html">Listener SSL</a></li> <li><a href="Templates_Help.html">Virtual Host Templates</a></li> <li><a href="VirtualHosts_Help.html">Virtual Host Basic</a></li> <li><a href="VHGeneral_Help.html">Virtual Host General</a></li> <li><a href="VHSecurity_Help.html">Virtual Host Security</a></li> <li><a href="VHSSL_Help.html">Virtual Host SSL</a></li> <li><a href="Rewrite_Help.html">Rewrite</a></li> <li><a href="Context_Help.html">Context</a></li> <ul class="level3"> <li><a href="Static_Context.html">Static Context</a></li> <li> <a href="Java_Web_App_Context.html">Java Web App Context</a> </li> <li><a href="Servlet_Context.html">Servlet Context</a></li> <li><a href="FCGI_Context.html">Fast CGI Context</a></li> <li><a href="LSAPI_Context.html">LSAPI Context</a></li> <li><a href="Proxy_Context.html">Proxy Context</a></li> <li><a href="CGI_Context.html">CGI Context</a></li> <li><a href="LB_Context.html">Load Balancer Context</a></li> <li><a href="Redirect_Context.html">Redirect Context</a></li> <li><a href="App_Server_Context.html">App Server Context</a></li> <li><a href="Module_Context.html">Module Handler Context</a></li> </ul> <li><span class="current"><a href="VHWebSocket_Help.html">Web Socket Proxy</a></span></li> </ul> </li> <li><a href="webconsole.html">Web Console</a> <ul class="level2"> <li><a href="AdminGeneral_Help.html">Admin Console General</a></li> <li><a href="AdminSecurity_Help.html">Admin Console Security</a></li> <li> <a href="AdminListeners_General_Help.html"> Admin Listener General </a> </li> <li> <a href="AdminListeners_SSL_Help.html">Admin Listener SSL</a> </li> </ul> </li> </ul> </div> </aside> <article class="contentwrapper ls-col-3-5 clearfix"><div class="nav-bar ls-spacer-micro-top"><div class="prev">« <a href="Context_Help.html">Context</a></div><div class="center"><a href="config.html">Configuration</a></div><div class="next"> </div></div> <h1>网络套接字代理</h1><section class="ls-spacer-small-bottom"><a href="http://en.wikipedia.org/wiki/WebSocket">WebSocket</a>是可以代替HTTP通过Internet进行用来提供实时,双向通信的协议 。 从版本1.1.1开始,OpenLiteSpeed通过使用WebSocket代理支持WebSocket后端。 这些代理会将WebSocket通信发送到{ITEM=wsaddr}字段中设定的后端。</section> <h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header>Web Socket</header><p> <a href="#wsuri">URI</a> | <a href="#wsaddr">地址</a></p></section> </section> <section><div class="helpitem"><article class="ls-helpitem"><div><header id="wsuri"><h3>URI<span class="ls-permlink"><a href="#wsuri"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定将使用此WebSocket后端的URI。 仅当该URI包含WebSocke协议升级请求时,才会将其流量转发到WebSocket后端。<br/><br/> 没有议升级请求的流量将自动转发到此URI所属的Context。 如果此URI不存在任何Context,则LSWS会将该流量视为访问位置为<span class="val">$DOC_ROOT/URI</span>的静态Context。</p> <h4>Syntax</h4><p>普通URI(以“/”开头)。 如果URI以“/”结尾,则此WebSocket后端将包括此URI下的所有子URI。</p> <h4>例子</h4><div class="ls-example">将WebSocket代理与Context结合使用,可以使您以不同的方式在同一页面上提供不同类型的流量,从而优化性能。 您可以将WebSocket流量发送到WebSocket后端,同时设置静态Context以使LSWS为页面的静态内容服务,或者可以设置LSAPI Context以使LSWS可以为PHP内容服务(这两个LSWS都比WebSocket后端更高效)。</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="wsaddr"><h3>地址<span class="ls-permlink"><a href="#wsaddr"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>WebSocket 后端使用的唯一网络套接字地址。 支持 IPv4 套接字、IPv6 套接字和 Unix 域套接字 (UDS)。 IPv4 和 IPv6 套接字可用于网络上的通信。 只有当 WebSocket 后端与服务器在同一台机器上时,才能使用 UDS。</p> <h4>Syntax</h4><p>IPv4/IPv6 address:port, UDS://path, or unix:path</p> <h4>例子</h4><div class="ls-example">127.0.0.1:5434 <br/> UDS://tmp/lshttpd/php.sock<br/> unix:/tmp/lshttpd/php.sock</div><h4>提示</h4><p><span title="Security" class="ls-icon-security"></span> If the WebSocket backend runs on the same machine, UDS is preferred. If you have to use an IPv4 or IPv6 socket, set the IP address to localhost or 127.0.0.1, so the WebSocket backend is inaccessible from other machines.<br/> <span title="Performance" class="ls-icon-performance"></span> Unix Domain Sockets generally provide higher performance than IPv4 or IPv6 sockets.</p> </article> </div> </section> </article><div class="ls-col-1-1"><footer class="copyright">Copyright © 2013-2020. <a href="https://www.litespeedtech.com">LiteSpeed Technologies Inc.</a> 版权所有.</footer> </div></div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings