File manager - Edit - /usr/local/lswsbak/docs/zh-CN/External_LSAPI.html
Back
<!DOCTYPE html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>OpenLiteSpeed Users' Manual - LiteSpeed SAPI App</title> <meta name="description" content="OpenLiteSpeed Users' Manual - LiteSpeed SAPI App." /> <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><span class="current"><a href="External_LSAPI.html">LSAPI App</a></span></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><a href="VHWebSocket_Help.html">Web Socket Proxy</a></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="External_FCGI_Auth.html">Fast CGI Authorizer</a></div><div class="center"><a href="ExtApp_Help.html">外部应用</a></div><div class="next"><a href="External_Servlet.html">Servlet Engine</a> »</div></div> <h1>LiteSpeed SAPI App</h1><h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header>LiteSpeed SAPI</header><p> <a href="#extAppName">名称</a> | <a href="#extAppAddress">地址</a> | <a href="#maxConns">最大连接数</a> | <a href="#env">环境</a> | <a href="#initTimeout">初次请求超时时间 (secs)</a> | <a href="#retryTimeout">重试超时时间 (secs)</a> | <a href="#persistConn">持久连接</a> | <a href="#pcKeepAliveTimeout">持久连接超时时间</a> | <a href="#respBuffer">响应缓冲</a> | <a href="#autoStart">开机自启</a> | <a href="#extAppPath">命令</a> | <a href="#backlog">Back Log</a> | <a href="#instances">实例数</a> | <a href="#extUser">Run As User</a> | <a href="#extGroup">以特定组运行</a> | <a href="#extUmask">umask</a> | <a href="#runOnStartUp">开机自启</a> | <a href="#extMaxIdleTime">最大空闲时间</a> | <a href="#extAppPriority">优先级</a> | <a href="#memSoftLimit">内存软限制 (bytes)</a> | <a href="#memHardLimit">内存硬限制 (bytes)</a> | <a href="#procSoftLimit">进程软限制</a> | <a href="#procHardLimit">进程硬限制</a></p></section> </section> <section><div class="helpitem"><article class="ls-helpitem"><div><header id="extAppName"><h3>名称<span class="ls-permlink"><a href="#extAppName"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>此外部应用程序的唯一名称。 在配置的其他部分中使用该名称时,将使用该名称进行引用。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extAppAddress"><h3>地址<span class="ls-permlink"><a href="#extAppAddress"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>外部应用程序使用的唯一套接字地址。 支持IPv4/IPv6套接字和Unix域套接字(UDS)。 IPv4/IPv6套接字可用于网络通信。 只有当外部应用程序与服务器在同一台机器上时,才能使用UDS。</p> <h4>Syntax</h4><p>IPv4 或 IPV6 address:port 或者 UDS://path</p> <h4>例子</h4><div class="ls-example">127.0.0.1:5434<br/> UDS://tmp/lshttpd/php.sock.</div><h4>提示</h4><p>[安全建议] 如果外部应用程序在同一台机器上运行,则首选UDS。如果必须使用IPv4|IPV6, 将IP地址设置为<span class="val">localhost</span>或<span class="val">127.0.0.1</span>,这样外部应用就无法从其他机器上访问。 [性能建议] Unix域套接字一般比IPv4套接字拥有更高的性能。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="maxConns"><h3>最大连接数<span class="ls-permlink"><a href="#maxConns"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器与外部应用之间可建立的最大并发连接数。该设置控制外部应用程序可同时处理多少个请求。 然而,真正的限制还取决于外部应用本身。如果外部的速度不够快,或者无法处理大量的并发请求,那么将这个值设置得更高也无济于事。</p> <h4>Syntax</h4><p>整数</p> <h4>提示</h4><p>[性能建议] 设置一个高值并不能直接变成高性能。设置为一个不会使外部应用程序过载的值,将提供最佳的性能/吞吐量。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="env"><h3>环境<span class="ls-permlink"><a href="#env"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>为外部应用程序指定额外的环境变量。</p> <h4>Syntax</h4><p>Key=value. Multiple variables can be separated by "ENTER"</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="initTimeout"><h3>初次请求超时时间 (secs)<span class="ls-permlink"><a href="#initTimeout"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器等待外部应用响应新建立的连接的第一个请求的最大时间 如果服务器在这个限制时间内没有收到外部应用的任何数据,它将把这个连接标记为坏(Bad)。这有助于识别与外部应用程序的通信问题。 这有助于尽快发现与外部应用的通信问题。如果某些请求的处理时间较长,则增加这个限制以避免503错误信息。</p> <h4>Syntax</h4><p>整数</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="retryTimeout"><h3>重试超时时间 (secs)<span class="ls-permlink"><a href="#retryTimeout"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器在重试之前,等待出现通信问题的外部应用程序的时间。</p> <h4>Syntax</h4><p>整数</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="persistConn"><h3>持久连接<span class="ls-permlink"><a href="#persistConn"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定在处理完请求后是否要保持连接 持久连接可以提高性能, 但某些FastCGI外部应用程序不完全支持持久连接。默认为 "On"。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="pcKeepAliveTimeout"><h3>持久连接超时时间<span class="ls-permlink"><a href="#pcKeepAliveTimeout"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定保持持久连接的最大时间,以秒为单位。<br/><br/> 如果设置成"-1",连接将不会超时. 当设置成0或者更大, 连接将在这些秒数后被关闭。</p> <h4>Syntax</h4><p>int</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="respBuffer"><h3>响应缓冲<span class="ls-permlink"><a href="#respBuffer"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否要从外部应用程序缓冲收到的响应。 如果nph-(Non-Parsed-Header)脚本被检测到,则关闭具有完整HTTP头的缓冲响应。</p> <h4>Syntax</h4><p>从列表中选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="autoStart"><h3>开机自启<span class="ls-permlink"><a href="#autoStart"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否要Web服务器自动启动应用程序。只有运行在同一台机器上的FastCGI和LSAPI应用程序才能自动启动。 <span class="tagl"><a href="#extAppAddress">地址</a></span>中的IP必须是本地IP. 通过LiteSpeed CGI守护进程而不是主服务器进程启动,有助于减少系统开销。<br/><br/> Default value: Yes (Through CGI Daemon)</p> <h4>Syntax</h4><p>从列表中选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extAppPath"><h3>命令<span class="ls-permlink"><a href="#extAppPath"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定包含外部应用程序的执行参数在内的完整命令行。 需要<span class="tagl"><a href="#autoStart">开机自启</a></span>的值为enable.如果参数中包含空格或制表符,应使用双引号或单引号将其引起。</p> <h4>Syntax</h4><p>Full path to the executable with optional parameters.</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#autoStart">开机自启</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="backlog"><h3>Back Log<span class="ls-permlink"><a href="#backlog"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies the backlog of the listening socket. Required if <span class="tagl"><a href="#autoStart">开机自启</a></span> is enabled.</p> <h4>Syntax</h4><p>整数</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="instances"><h3>实例数<span class="ls-permlink"><a href="#instances"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器创建的外部应用的最大实例数。这个选项需要<span class="tagl"><a href="#autoStart">开机自启</a></span>的值为enable. 大多数FastCGI/LSAPI应用程序每个进程实例只能处理一个请求,对于这种类型的应用,实例数应与<span class="tagl"><a href="#maxConns">最大连接数</a></span>的值相匹配。 而有些FastCGI/LSAPI应用程序可以生成多个子进程以同时处理多个请求. 对于这种类型的应用,应将实例设置为 "1",并使用环境变量来控制应用可以生成多少个子进程。</p> <h4>Syntax</h4><p>整数</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extUser"><h3>Run As User<span class="ls-permlink"><a href="#extUser"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>The external application will run as this specified user name. If not set, Virtual Host level settings will be inherited.<br/><br/> Default value: Not Set</p> <h4>Syntax</h4><p>Valid username.</p> <h4>See Also</h4><p class="ls-text-small">extGroup</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extGroup"><h3>以特定组运行<span class="ls-permlink"><a href="#extGroup"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>外部应用程序将作为此指定的组名运行。如果未设置,将继承虚拟主机级别的设置。<br/><br/> Default value: Not Set</p> <h4>Syntax</h4><p>Valid group name.</p> <h4>See Also</h4><p class="ls-text-small">extUser</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extUmask"><h3>umask<span class="ls-permlink"><a href="#extUmask"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Sets default umask for this external application's processes. See <span class="cmd"> man 2 umask </span> for details. The default value taken from the server-level <span class="tagl"><a href="ServSecurity_Help.html#umask">umask</a></span> setting.</p> <h4>Syntax</h4><p>value valid range [000]-[777].</p> <h4>See Also</h4><p class="ls-text-small">CGI <span class="tagl"><a href="ServSecurity_Help.html#umask">umask</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="runOnStartUp"><h3>开机自启<span class="ls-permlink"><a href="#runOnStartUp"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否在服务器启动时启动外部应用程序. 只适用于可以管理自己子进程的外部应用程序,并且<span class="tagl"><a href="#instances">实例数</a></span>值设置为"1"。<br/><br/> 如果启用,将在服务器启动时而不是运行时创建外部进程.<br/><br/> When selecting "Yes (Detached mode)", all detached process can be restarted at the Server level or Virtual Host level by touching the '.lsphp_restart.txt' file under the $SERVER_ROOT/admin/tmp/ or $VH_ROOT/ directory respectively.<br/><br/> Default value: Yes (Detached mode)</p> <h4>Syntax</h4><p>从单选框选择</p> <h4>提示</h4><p>[性能建议] 如果配置的外部进程有很大的启动开销,比如Rails,那么应该启用这个选项来减少首页响应时间。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extMaxIdleTime"><h3>最大空闲时间<span class="ls-permlink"><a href="#extMaxIdleTime"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器停止外部应用之前的最大空闲时间,以释放空闲资源。 当设置为"-1"时,服务器将不会停止外部应用,除非在ProcessGroup模式下运行, 而在ProcessGroup模式下,闲置的外部应用将在30秒后停止.<br/><br/> 默认值为: <span class="val">-1{/val}</p> <h4>Syntax</h4><p>Integer number</p> <h4>提示</h4><p><span title="Performance" class="ls-icon-performance"></span> This feature is especially useful in the mass hosting environment where, in order to prevent files owned by one virtual host from being accessed by the external application scripts of another virtual host, many different applications are run at the same time in SetUID mode. Set this value low to prevent these external applications from idling unnecessarily.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extAppPriority"><h3>优先级<span class="ls-permlink"><a href="#extAppPriority"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定外部应用的优先级,值的范围是<span class="val">-20</span>到<span class="val">20</span>. 一个小的数字意味着高优先级.外部应用进程的优先级不能比Web服务器高. 如果该优先级设置一个比服务器的优先级小的数字,则将使用服务器的优先级。</p> <h4>Syntax</h4><p>int</p> <h4>See Also</h4><p class="ls-text-small">Server <span class="tagl"><a href="ServGeneral_Help.html#serverPriority">优先级</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="memSoftLimit"><h3>内存软限制 (bytes)<span class="ls-permlink"><a href="#memSoftLimit"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>以字节为单位指定服务器启动的外部应用进程或程序的内存占用限制。<br/><br/> 此限制的目的主要是为了防范软件缺陷或蓄意攻击造成的过度内存使用, 而不是限制正常使用。确保留有足够的内存,否则您的应用程序可能故障并 返回503错误。限制可以在服务器级别或独立的外部应用程序级别设置。如 果未在独立的外部应用程序级别设定限制,将使用服务器级别的限制。<br/><br/> 如果在两个级别都没有设置该限制,或者限制值设为<span class="val">0</span>,将使用操 作系统的默认设置。</p> <h4>Syntax</h4><p>整数</p> <h4>提示</h4><p>[注意] 不要过度调整这个限制。如果您的应用程序需要更多的内存, 这可能会导致503错误。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="memHardLimit"><h3>内存硬限制 (bytes)<span class="ls-permlink"><a href="#memHardLimit"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>与<span class="tagl"><a href="#memSoftLimit">内存软限制 (bytes)</a></span>非常相同,但是在一个用户进程中,软限制 可以被放宽到硬限制的数值。硬限制可以在服务器级别或独立的外部应用程序级别设 置。如果未在独立的外部应用程序级别设定限制,将使用服务器级别的限制。<br/><br/> 如果在两个级别都没有设置该限制,或者限制值设为<span class="val">0</span>,将使用操 作系统的默认设置。</p> <h4>Syntax</h4><p>整数</p> <h4>提示</h4><p>[注意] 不要过度调整这个限制。如果您的应用程序需要更多的内存, 这可能会导致503错误。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="procSoftLimit"><h3>进程软限制<span class="ls-permlink"><a href="#procSoftLimit"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>限制用户可以创建的进程总数.所有现有的进程都将被计算在这个限制之内,而不仅仅是要启动的新进程。<br/><br/> 该限制可以在服务器级别或单个外部应用级别进行设置.如果未在应用级别设置,则将使用服务器级别的限制. 如果该值为0或服务器级和应用级都没有设置,将使用操作系统的默认设置</p> <h4>Syntax</h4><p>整数</p> <h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> PHP scripts can call for forking processes. The main purpose of this limit is as a last line of defense to prevent fork bombs and other attacks caused by PHP processes creating other processes.<br/><br/> Setting this setting too low can severely hurt functionality. The setting will thus be ignored below certain levels.<br/><br/> When <b>Run On Start Up</b> is set to "Yes (Daemon mode)", the actual process limit will be higher than this setting to make sure parent processes are not limited.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="procHardLimit"><h3>进程硬限制<span class="ls-permlink"><a href="#procHardLimit"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>与<span class="tagl"><a href="#procSoftLimit">进程软限制</a></span>非常相同,但是,在用户进程中软限制 可以被放宽到硬限制的数值。硬限制可以在服务器级别或独立的外部应用程序级别设 置。如果未在独立的外部应用程序级别设定限制,将使用服务器级别的限制。 如果在两个级别都没有设置该限制,或者限制值设为<span class="val">0</span>,将使用操 作系统的默认设置。</p> <h4>Syntax</h4><p>整数</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