File manager - Edit - /usr/local/lswsbak/docs/zh-CN/ServGeneral_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><span class="current"><a href="ServGeneral_Help.html">Server General</a></span></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><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"> </div><div class="center"><a href="config.html">Configuration</a></div><div class="next"><a href="ServLog_Help.html">服务器日志</a> »</div></div> <h1>服务器常规</h1><section class="ls-spacer-small-bottom">整个服务器的常规设置。 当设置中需要路径信息时,它可以是绝对路径,也可以相对于$SERVER_ROOT。 $SERVER_ROOT是LiteSpeed Web服务器的安装位置(例如,your_home_dir/lsws或/opt/lsws)。 服务器可执行文件位于$SERVER_ROOT/bin下。</section> <h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header>服务器进程</header><p> <a href="#serverName">服务器名称</a> | <a href="#httpdWorkers">工具人(Workers)的数量</a> | <a href="#runningAs">运行方式</a> | <a href="#serverPriority">优先级</a> | <a href="#cpuAffinity">处理器亲和性</a> | <a href="#enableLVE">Cloud-Linux</a> | <a href="#inMemBufSize">最大的读写缓冲区大小</a> | <a href="#swappingDir">交换目录</a> | <a href="#autoFix503">自动修复503错误</a> | <a href="#enableh2c">启用 明文TCP上的HTTP/2</a> | <a href="#gracefulRestartTimeout">平滑重启超时时长(secs)</a> | <a href="#statDir">统计输出目录</a> | <a href="#jsonReports">Output JSON reports</a></p></section> <section class="toc-row"><header>常规设置</header><p> <a href="#mime">MIME设置</a> | <a href="#mimesuffix">后缀</a> | <a href="#mimetype">MIME类型</a> | <a href="#disableInitLogRotation">禁用初始日志轮换</a> | <a href="#showVersionNumber">服务器签名</a> | <a href="#enableIpGeo">启用IP地理定位</a> | <a href="#useIpInProxyHeader">使用报头中的客户端IP</a> | <a href="#adminEmails">管理员电子邮箱</a></p></section> <section class="toc-row"><header>索引文件</header><p> <a href="#indexFiles">索引文件</a> | <a href="#autoIndex">自动索引</a> | <a href="#autoIndexURI">自动索引URI</a></p></section> <section class="toc-row"><header>Expires Settings</header><p> <a href="#enableExpires">启用过期</a> | <a href="#expiresDefault">默认过期</a> | <a href="#expiresByType">按类型过期</a></p></section> <section class="toc-row"><header>Rewrite Control</header><p> <a href="#autoLoadHtaccess">自动加载.htaccess</a></p></section> <section class="toc-row"><header><a href="#fileUpload">文件上传</a></header><p> <a href="#uploadTmpDir">临时文件路径</a> | <a href="#uploadTmpFilePermission">临时文件权限</a> | <a href="#uploadPassByPath">通过文件路径传递上传数据</a></p></section> <section class="toc-row"><header><a href="#geolocationDB">IP地理定位数据库</a></header><p> <a href="#geoipDBFile">数据库文件路径</a> | <a href="#geoipDBName">数据库名称</a> | <a href="#maxMindDBEnv">环境变量</a></p></section> <section class="toc-row"><header>IP2Location 数据库</header><p> <a href="#ip2locDBFile">IP2Location数据库文件路径</a> | <a href="#ip2locDBCache">数据库缓存类型</a></p></section> </section> <section><div class="helpitem"><article class="ls-helpitem"><div><header id="serverName"><h3>服务器名称<span class="ls-permlink"><a href="#serverName"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>该服务器的唯一名称。您可以在此填写 $HOSTNAME 。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="httpdWorkers"><h3>工具人(Workers)的数量<span class="ls-permlink"><a href="#httpdWorkers"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定httpd工作程序的数量.</p> <h4>Syntax</h4><p>Integer value between 1 and 16.</p> <h4>提示</h4><p>[性能] 设置适当的数字以满足您的需求。 增加更多的数量不一定意味着更好的效果。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="runningAs"><h3>运行方式<span class="ls-permlink"><a href="#runningAs"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器进程运行的用户/组。 在安装之前运行configure命令时,使用参数“--with-user”和“ --with-group”进行设置。 要重置这些值,必须重新运行configure命令并重新安装。</p> <h4>应用</h4><p>Reinstall required.</p> <h4>提示</h4><p>[安全] 服务器不应该以特权用户列如"root"来运行. 将服务器配置为以非特权用户/组运行非常重要 没有登入和Shell的权限 <span class="val">nobody</span>用户(组)通常是个不错的选择.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="serverPriority"><h3>优先级<span class="ls-permlink"><a href="#serverPriority"></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>。数值越小,优先级越高。</p> <h4>Syntax</h4><p>Integer number</p> <h4>提示</h4><p>[性能] 通常,较高的优先级会导致繁忙的服务器上的Web性能稍有提高。 不要将优先级设置为高于数据库进程的优先级。</p> <h4>See Also</h4><p class="ls-text-small">External App <span class="tagl"><a href="ExtApp_Help.html#extAppPriority">优先级</a></span>, <span class="tagl"><a href="ServSecurity_Help.html#CGIPriority">CGI优先级</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="cpuAffinity"><h3>处理器亲和性<span class="ls-permlink"><a href="#cpuAffinity"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>CPU关联将进程绑定到一个或多个CPU(核心)。 始终使用同一CPU对进程来说是有益的,因为这样进程可以利用CPU缓存中剩余的数据。 如果进程移至其他CPU,则不会使用CPU缓存,并且会产生不必要的开销。<br/><br/> CPU Affinity设置控制一个服务器进程将与多少个CPU(核心)相关联。 最小值为<span class="val">0</span>,它将禁用此功能。 最大值是服务器具有的核心数。 通常,<span class="val">1</span>是最佳设置,因为它会最严格地使用CPU亲和力,从而最大程度地利用CPU缓存。<br/><br/> Default value: 0</p> <h4>Syntax</h4><p>Integer value from 0 to 64. (0 will disable this feature)</p> <h4>应用</h4><p>Reinstall required.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="enableLVE"><h3>Cloud-Linux<span class="ls-permlink"><a href="#enableLVE"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定当CloudLinux存在时是否启用CloudLinux的轻量级虚拟 环境(LVE)。您可以搭配使用Litespeed与LVE实现更好的资源管理。 欲了解更多信息,请访问 <a href="http://www.cloudlinux.com" target="_blank" rel="noopener noreferrer">http://www.cloudlinux.com</a>。</p> <h4>Syntax</h4><p>从列表中选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="inMemBufSize"><h3>最大的读写缓冲区大小<span class="ls-permlink"><a href="#inMemBufSize"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定用于存储请求内容和相应的动态响应的最大缓冲区大小。达到此限制时, 服务器将在<span class="tagl"><a href="#swappingDir">交换目录</a></span>中创建临时交换文件。</p> <h4>Syntax</h4><p>整数</p> <h4>提示</h4><p>[性能] 设置足够大的缓冲区,以容纳所有并发 请求/响应,避免内存和磁盘数据交换。如果交换目录(默认为/tmp/lshttpd/swap/)存在频繁的读写活动,说明缓冲区太小,LiteSpeed正在使用交换文件。</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#swappingDir">交换目录</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="swappingDir"><h3>交换目录<span class="ls-permlink"><a href="#swappingDir"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定交换文件的存放目录。 服务器在chroot模式启动时,该路径相对于新的根目录, 否则,它相对于真正的根目录。<br/><br/> Litespeed使用自己的虚拟内存 以降低系统的内存使用量。虚拟内存和磁盘交换会用来存储大的请求内容和 动态响应。交换目录应设置在有足够剩余空间的磁盘上。<br/><br/> 默认值: /tmp/lshttpd/swap</p> <h4>Syntax</h4><p>绝对路径</p> <h4>提示</h4><p>[性能建议] 将交换目录设置在一个单独的磁盘上,或者增加最大读写缓冲区大小以避免交换。</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#inMemBufSize">最大的读写缓冲区大小</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="autoFix503"><h3>自动修复503错误<span class="ls-permlink"><a href="#autoFix503"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否尝试通过平滑重启LiteSpeed修复“503 服务不可用”错误。“503”错误通常是由 发生故障的外部应用程序引起的,Web服务器重新启动往往可以临时修复 错误。如果启用,当30秒内出现超过30次“503”错误时,服务器将自动 重新启动。此功能是默认启用的。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="enableh2c"><h3>启用 明文TCP上的HTTP/2<span class="ls-permlink"><a href="#enableh2c"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否通过非加密TCP连接启用HTTP/2。 默认设置为禁用。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="gracefulRestartTimeout"><h3>平滑重启超时时长(secs)<span class="ls-permlink"><a href="#gracefulRestartTimeout"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>平滑重启时,即使新的服务器实例已经启动,旧的实例仍将继续 处理现有的请求。此项超时设置定义了旧实例等待多长时间后中止。 默认值是300秒。 -1表示永远等待。 0表示不等待,立即中止。</p> <h4>Syntax</h4><p>int</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="statDir"><h3>统计输出目录<span class="ls-permlink"><a href="#statDir"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>实时统计报告文件将写入的目录。 默认目录是 <b>/tmp/lshttpd/</b> .</p> <h4>Syntax</h4><p>绝对路径</p> <h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> 在服务器操作期间,.rtreport文件将每秒写入一次。 为避免不必要的磁盘写入,请将其设置为RAM磁盘。<br/> .rtreport文件可以与第三方监控软件一起使用,以跟踪服务器的运行状况。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="jsonReports"><h3>Output JSON reports<span class="ls-permlink"><a href="#jsonReports"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Output additional JSON formatted report files, with the .json extension, to the /tmp/lshttpd directory.<br/><br/> Default value: <span class="val">No</span></p> <h4>Syntax</h4><p>从单选框选择</p> <h4>例子</h4><div class="ls-example">When set to <span class="val">Yes</span>, .status.json and .rtreport.json, .rtreport.2.json, etc report files will be created in addition to the usual .status and .rtreport, .rtreport.2, etc report files.</div><h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> This is useful for application developers who may want to integrate LiteSpeed status and real-time reports into their applications using standard JSON processing tools built-in to most programming languages.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="mime"><h3>MIME设置<span class="ls-permlink"><a href="#mime"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>为此服务器指定包含MIME设置的文件。 在chroot模式中提供了绝对路径时,该文件路径总是相对于真正的根。 点击文件名可查看/编辑详细的MIME项。</p> <h4>Syntax</h4><p>文件名可以是绝对路径,也可以是相对于$SERVER_ROOT的相对路径。</p> <h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> Click the filename to edit the MIME settings.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="mimesuffix"><h3>后缀<span class="ls-permlink"><a href="#mimesuffix"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>你可以列出相同MIME类型的多个后缀,用逗号分隔。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="mimetype"><h3>MIME类型<span class="ls-permlink"><a href="#mimetype"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>MIME类型由类型和子类型组成,格式为“类型/子类型”.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="disableInitLogRotation"><h3>禁用初始日志轮换<span class="ls-permlink"><a href="#disableInitLogRotation"></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="showVersionNumber"><h3>服务器签名<span class="ls-permlink"><a href="#showVersionNumber"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否在响应头的Server参数中显示服务器签名和版本号。 有三个选项: 当设置为<span class="val">Hide Version</span>时、只显示<span class="val">LiteSpeed</span>。当设置为 <span class="val">Show Version</span>,显示LiteSpeed和版本号。 设置为<span class="val">Hide Full Header</span>时,整个Server头都不会显示在响应报头中。</p> <h4>Syntax</h4><p>从列表中选择</p> <h4>提示</h4><p>[安全建议] 如果你不想暴露服务器的版本号,设置为<span class="val">Hide Version</span>。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="enableIpGeo"><h3>启用IP地理定位<span class="ls-permlink"><a href="#enableIpGeo"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否启用IP地理定位查找。 可以在服务器级别,虚拟主机级别,或context级别设置。</p> <h4>Syntax</h4><p>从单选框选择</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="ServGeneral_Help.html#useIpInProxyHeader">使用报头中的客户端IP</a></span>, <span class="tagl"><a href="ServGeneral_Help.html#geoipDBFile">数据库文件路径</a></span>,</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="useIpInProxyHeader"><h3>使用报头中的客户端IP<span class="ls-permlink"><a href="#useIpInProxyHeader"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否将在HTTP请求报头中的X-Forwarded-For参数列出的IP地址,用于 所有的IP地址相关的功能,包括 连接/带宽限制、访问控制和IP地理定位。<br/><br/> 如果你的Web服务器放置在负载均衡器或代理服务器之后,此功能非常有用。 如果您选择了“仅限受信任的IP”,只有在请求来自受信任IP时,X-Forwarded-For 中的IP才会被使用。受信任IP可在服务器级别的<span class="tagl"><a href="ServSecurity_Help.html#accessControl_allow">允许列表</a></span>中定义。<br/><br/> <span class="val">来自受信任IP的保留标头</span>与<span class="val">仅受信任IP </span>相同,但是用于后端的X-Forwarded-For标头不会被修改为包括连接对等地址。<br/><br/> <span class="val">使用最后一个IP (对与 AWS ELB)</span>将使用 "X-Forwarded-For "列表中的最后一个 IP 地址。如果您正在使用 AWS Elastic Load Balancer 或期望将真实 IP 附加到 "X-Forwarded-For "列表的末尾,请选择此选项。</p> <h4>Syntax</h4><p>从列表中选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="adminEmails"><h3>管理员电子邮箱<span class="ls-permlink"><a href="#adminEmails"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定服务器管理员的电子邮箱地址。 如果设置了电子邮箱地址,管理员将收到重要事件的电子邮件通知(例如, LiteSpeed服务因崩溃而自动重启或者授权即将过期)。</p> <h4>Syntax</h4><p>Comma delimited list of email address.</p> <h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> 电子邮件提醒功能只有在服务器有活动的MX服务器(如postfix、exim或sendmail)的情况下才会生效。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="indexFiles"><h3>索引文件<span class="ls-permlink"><a href="#indexFiles"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定URL映射到目录时顺序查找的索引文件名称。 您可以在服务器、虚拟主机和Context级别对其进行自定义。</p> <h4>Syntax</h4><p>Comma-delimited list of index filenames.</p> <h4>提示</h4><p>[性能建议] 只设置你需要的索引文件。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="autoIndex"><h3>自动索引<span class="ls-permlink"><a href="#autoIndex"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>在目录中,当<span class="tagl"><a href="#indexFiles">索引文件</a></span>中所列的索引文件不可用时,指定运行时是否即时生成目录索引。<br/> 此选项可以在虚拟主机级别和context级别中设置,并可以顺着目录树继承,直到被覆盖。 您可以自定义生成的索引页面。请访问在线百科了解如何操作。</p> <h4>Syntax</h4><p>从单选框选择</p> <h4>提示</h4><p>[安全建议] 建议关闭自动索引,从而尽可能防止泄露机密数据。</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#indexFiles">索引文件</a></span>, <span class="tagl"><a href="#autoIndexURI">自动索引URI</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="autoIndexURI"><h3>自动索引URI<span class="ls-permlink"><a href="#autoIndexURI"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>在目录中,当<span class="tagl"><a href="#indexFiles">索引文件</a></span>中所列出的索引文件(index)不可用时,指定用来生成索引页面的URI。 LiteSpeed Web服务器使用一个外部脚本来生成索引页面,从而为定制提供最大的灵活性。 默认的脚本生成一个类似于Apache的索引页面。 定制生成的索引页,请访问在线百科。 被索引的目录通过一个环境变量 "LS_AI_PATH"来传递给脚本。</p> <h4>Syntax</h4><p>URI</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#indexFiles">索引文件</a></span>, <span class="tagl"><a href="#autoIndex">自动索引</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="enableExpires"><h3>启用过期<span class="ls-permlink"><a href="#enableExpires"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否为静态文件生成Expires头。如果启用,将根据 <span class="tagl"><a href="#expiresDefault">默认过期</a></span>和<span class="tagl"><a href="#expiresByType">按类型过期</a></span>生成Expires头。<br/><br/> 这可以在服务器,虚拟主机和Context级别设置。低级别的设置将 覆盖高级别的设置。例如,Context级别的设置将覆盖虚拟主机级别的设置, 虚拟主机级别的设置将覆盖服务器级别的设置。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="expiresDefault"><h3>默认过期<span class="ls-permlink"><a href="#expiresDefault"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定生成Expires头的默认设置。该设置在<span class="tagl"><a href="#enableExpires">启用过期</a></span> 设为“启用”时有效。它可以被<span class="tagl"><a href="#expiresByType">按类型过期</a></span>覆盖。 除非必要,否则不要在服务器或虚拟主机级别设置该默认值。 因为它会为所有网页生成Expires头。大多数时候,应该是 为不常变动的某些目录在Context级别设置。如果没有默认设置,<span class="tagl"><a href="#expiresByType">按类型过期</a></span>中未指定的类型不会生成Expires头。</p> <h4>Syntax</h4><p>A|Mseconds<br/> 文件将在基准时间(A|M)加指定秒数的时间后失效。 “A”代表基准时间为客户端的访问时间,“M”代表文件的最后修改时间。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="expiresByType"><h3>按类型过期<span class="ls-permlink"><a href="#expiresByType"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>为各个MIME类型分别指定Expires头设置。</p> <h4>Syntax</h4><p>逗号分隔的“MIME-类型=A|M秒数”的列表。 文件将在基准时间(A|M)加指定秒数的时间后失效。<br/><br/> “A”代表基准时间为客户端的访问时间,“M”代表文件的最后修改时间。 MIME-类型可使用通配符“*”,如image/*。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="autoLoadHtaccess"><h3>自动加载.htaccess<span class="ls-permlink"><a href="#autoLoadHtaccess"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>如果使用<b>rewritefile</ b>指令的目录的HttpContext不存在,则在初次访问该目录时自动加载.htaccess文件中包含的重写规则。 最初加载后,必须执行正常重启才能使对该.htaccess文件的修改生效。<br/><br/> 虚拟主机级别设置将覆盖服务器级别设置。 默认值:<br/><br/> <b>Server-level:</b> No<br/><br/> <b>VH-Level:</b> Inherit Server-level setting</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="fileUpload"><h3>文件上传<span class="ls-permlink"><a href="#fileUpload"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>通过使用请求正文解析器将文件解析到服务器本地目录中来上传文件时,提供了附加的安全功能。第三方模块可以轻松地在文件本地目录中扫描文件是否存在危害。 当启用<span class="tagl"><a href="#uploadPassByPath">通过文件路径传递上传数据</a></span>或模块在LSI_HKPT_HTTP_BEGIN级别调用LSIAPI的set_parse_req_body时,将使用请求正文解析器。 源代码包中提供的API示例。</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#HTTP_BEGIN">Hook::HTTP_BEGIN Priority</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="uploadTmpDir"><h3>临时文件路径<span class="ls-permlink"><a href="#uploadTmpDir"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>在扫描请求正文工作时,上传到服务器的文件将存放在临时目录中 默认值为<span class="val">/tmp/lshttpd/</span>.</p> <h4>Syntax</h4><p>Absolute path or path starting with $SERVER_ROOT (for Server and VHost levels) or $VH_ROOT (for VHost levels).</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="uploadTmpFilePermission"><h3>临时文件权限<span class="ls-permlink"><a href="#uploadTmpFilePermission"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>设置<b>临时文件路径</b>目录中的文件权限。 服务器级别是全局设置,可以被虚拟主机级别的设置覆盖。</p> <h4>Syntax</h4><p>3 digits octet number. Default value is 666.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="uploadPassByPath"><h3>通过文件路径传递上传数据<span class="ls-permlink"><a href="#uploadPassByPath"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否按文件路径传递上传数据。 如果启用,则上传时文件路径以及其他一些信息将发送到后端处理程序,而不是文件本身。 这样可以节省CPU资源和文件传输时间,但需要一些更新才能实现。 如果禁用,则文件内容将传输到后端处理程序,请求主体仍解析为文件。</p> <h4>Syntax</h4><p>从单选框选择</p> <h4>提示</h4><p>[性能] 如果向下兼容不是问题,启用此功能可加快文件上传处理速度。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="geolocationDB"><h3>IP地理定位数据库<span class="ls-permlink"><a href="#geolocationDB"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>多个MaxMind地理定位数据库可以在这里指定。MaxMind有以下数据库类型: 国家,地区,城市,组织,ISP和NETSPEED。如果混合配置“国家”,“地区”,和“城市”类型数据库,则最后一项将会生效。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="geoipDBFile"><h3>数据库文件路径<span class="ls-permlink"><a href="#geoipDBFile"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定MaxMind GeoIP数据库路径。</p> <h4>Syntax</h4><p>绝对路径</p> <h4>例子</h4><div class="ls-example">/usr/local/share/GeoIP/GeoLite2-Country.mmdb</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="geoipDBName"><h3>数据库名称<span class="ls-permlink"><a href="#geoipDBName"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>MaxMind GeoIP数据库名称。从GeoIP2起,此设置是必需的。<br/><br/> 从GeoIP升级到GeoIP2时,为此设置“ COUNTRY_DB”,“CITY_DB”或“ ASN_DB”的值会自动使用一些与GeoIP兼容的条目(在下面的“数据库名称”值中列出)填充PHP的$ _SERVER变量,以简化此操作的过渡。<br/> <b>CITY_DB:</b> 'GEOIP_COUNTRY_CODE', 'GEOIP_COUNTRY_NAME', 'GEOIP_CONTINENT_CODE', 'GEOIP_COUNTRY_CONTINENT', 'GEOIP_DMA_CODE', 'GEOIP_METRO_CODE', 'GEOIP_LATITUDE', 'GEOIP_LONGITUDE', 'GEOIP_POSTAL_CODE', and 'GEOIP_CITY'.<br/> <b>COUNTRY_DB:</b> 'GEOIP_COUNTRY_CODE', 'GEOIP_COUNTRY_NAME', 'GEOIP_CONTINENT_CODE', and 'GEOIP_COUNTRY_CONTINENT'.<br/> <b>ASN_DB:</b> 'GEOIP_ORGANIZATION' and 'GEOIP_ISP'.</p> <h4>例子</h4><div class="ls-example">COUNTRY_DB</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="maxMindDBEnv"><h3>环境变量<span class="ls-permlink"><a href="#maxMindDBEnv"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>将数据库查找的结果分配给环境变量。</p> <h4>Syntax</h4><p>Variable_Name mapped_DB_data<br/><br/> One entry per line. Path to data can use map keys or 0-based array indexes, both being separated by /.</p> <h4>例子</h4><div class="ls-example">COUNTRY_CODE COUNTRY_DB/country/iso_code<br/> REGION_CODE CITY_DB/subdivisions/0/iso_code</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="ip2locDBFile"><h3>IP2Location数据库文件路径<span class="ls-permlink"><a href="#ip2locDBFile"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>有效数据库文件的位置。</p> <h4>Syntax</h4><p>文件名可以是绝对路径,也可以是相对于$SERVER_ROOT的相对路径。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="ip2locDBCache"><h3>数据库缓存类型<span class="ls-permlink"><a href="#ip2locDBCache"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>使用的缓存方法。 默认值为<span class="val">Memory</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