File: //usr/local/lsws/docs/zh-CN/ServGeneral_Help.html
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Open LiteSpeed Web Server Users' Manual - Server General</title>
<meta name="description" content="Open LiteSpeed Web Server Users' Manual - Server General." />
<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>
<h3 class="ls-text-thin">OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a></h3>
<h5 class="ls-text-muted">Version 1.6 — Rev. 2</h5>
<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>
</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">Server Log</a> »</div></div>
<h1>Server General</h1><section class="ls-spacer-small-bottom">General settings for the whole server. When path information is required in a setting,
it can be either absolute or relative to $SERVER_ROOT. $SERVER_ROOT is the
location where LiteSpeed web server has been installed (your_home_dir/lsws or
/opt/lsws, for example). The server executable is under $SERVER_ROOT/bin.</section>
<h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header>Server Process</header><p>
<a href="#serverName">服务器名称</a> | <a href="#httpdWorkers">Number of Workers</a> | <a href="#runningAs">Running As</a> | <a href="#serverPriority">优先级</a> | <a href="#cpuAffinity">CPU Affinity</a> | <a href="#enableLVE">Cloud-Linux</a> | <a href="#inMemBufSize">最大的读写缓冲区大小</a> | <a href="#swappingDir">交换目录</a> | <a href="#autoFix503">自动修复503错误</a> | <a href="#enableh2c">Enable HTTP/2 Over Cleartext TCP</a> | <a href="#gracefulRestartTimeout">平滑重启超时时长</a> | <a href="#statDir">Statistics Output Directory</a></p></section>
<section class="toc-row"><header>General Settings</header><p>
<a href="#mime">MIME设置</a> | <a href="#mimesuffix">后缀</a> | <a href="#mimetype">MIME类型</a> | <a href="#disableInitLogRotation">Disable Initial Log Rotation</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">Auto Load from .htaccess</a></p></section>
<section class="toc-row"><header><a href="#fileUpload">File Upload</a></header><p>
<a href="#uploadTmpDir">Temporary File Path</a> | <a href="#uploadTmpFilePermission">Temporary File Permissions</a> | <a href="#uploadPassByPath">Pass Upload Data by File Path</a></p></section>
<section class="toc-row"><header><a href="#geolocationDB">IP地理定位数据库</a></header><p>
<a href="#geoipDBFile">数据库文件路径</a> | <a href="#geoipDBName">DB Name</a> | <a href="#maxMindDBEnv">Environment Variables</a></p></section>
<section class="toc-row"><header>IP2Location DB</header><p>
<a href="#ip2locDBFile">IP2Location DB File Path</a> | <a href="#ip2locDBCache">DB Cache Type</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> <h4>Syntax</h4><p>文本</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="httpdWorkers"><h3>Number of 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>Specifies the number of httpd workers.</p> <h4>Syntax</h4><p>Integer value between 1 and 16.</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Set an appropriate number to suit your needs. Adding more workers may not necessarily mean better performance.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="runningAs"><h3>Running As<span class="ls-permlink"><a href="#runningAs"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies the user/group that the server process runs as. This is set using the parameters "--with-user" and "--with-group" when running the configure command before installation. To reset these values, you must rerun the configure command and reinstall.</p> <h4>Apply</h4><p>Reinstall required.</p> <h4>Tips</h4><p><span title="Security" class="ls-icon-security"></span> Server should not run as a privileged user such as "root". It is critical that the server is configured to run with a un-privileged user/group combination that does not have login/shell access. A user/group of <span class="val">nobody</span> is generally a good choice.</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>整数</p> <h4>Tips</h4><p>[性能建议] 通常在繁忙的服务器上,较高的优先级会得到性能的小幅提升。 不要设置比数据库进程更高的优先级。</p> <h4>See Also</h4><p class="ls-text-small">External App <span class="tagl"><a href="ExtApp_Help.html#extAppPriority">Priority</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>CPU Affinity<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 affinity binds a process to one or more CPUs (cores). It is beneficial for a process to always use the same CPU because then the process can make use of data left in CPU cache. If the process moves to a different CPU, there is no use of CPU cache and unnecessary overhead is required.<br/><br/> The CPU Affinity setting controls how many CPUs (cores) one server process will be associated with. The minimum value is <span class="val">0</span>, which will disable this feature. The maximum value is the number of cores the server has. Generally, <span class="val">1</span> is the best setting because because it creates the strictest use of CPU affinity and thus makes the most use of CPU cache.<br/><br/> Default value: 0</p> <h4>Syntax</h4><p>Integer value from 0 to 64. (0 will disable this feature)</p> <h4>Apply</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实现更好的资源管理。 欲了解更多信息,请访问 http: //www.cloudlinux.com。</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>Tips</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使用自己的虚拟内存 以降低系统的内存使用量。虚拟内存和磁盘交换会用来存储大的请求内容和 动态响应。交换目录应设置在有足够剩余空间的磁盘上。</p> <h4>Syntax</h4><p>绝对路径</p> <h4>Tips</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>Enable HTTP/2 Over Cleartext TCP<span class="ls-permlink"><a href="#enableh2c"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to enable HTTP/2 over non-encrypted TCP connections. Default is disabled.</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gracefulRestartTimeout"><h3>平滑重启超时时长<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>整数</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="statDir"><h3>Statistics Output Directory<span class="ls-permlink"><a href="#statDir"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>The directory where the Real-Time Stats report file will be written. The default directory is <b>/tmp/lshttpd/</b> .</p> <h4>Syntax</h4><p>绝对路径</p> <h4>Tips</h4><p><span title="Information" class="ls-icon-info"></span> During server operation, the .rtreport file will be written to every second. To avoid unnecessary disk writes, set this to a RAM Disk.<br/> The .rtreport file can be used with 3rd party monitoring software to track server health.</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>文件2</p> <h4>Tips</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>Disable Initial Log Rotation<span class="ls-permlink"><a href="#disableInitLogRotation"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to enable/disable rotation of server error log file at startup. Initial log rotation is enabled by default when using value "Not Set".</p> <h4>Syntax</h4><p>Select from radio box</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>Tips</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>中定义。</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>逗号分隔的电子邮箱地址列表。</p> <h4>Tips</h4><p><span title="Information" class="ls-icon-info"></span> 电子邮件提醒功能只在服务器拥有有效的邮件服务时才能正常工作,如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>逗号分隔的索引文件名列表。</p> <h4>Tips</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>Tips</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|M秒数<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>Auto Load from .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>Autoload rewrite rules contained in a directory's .htaccess file when first accessing that directory if an HttpContext for that directory using the <b>rewritefile</b> directive does not already exist. Once initially loaded, a graceful restart must be performed for any further changes to that .htaccess file to take effect.<br/><br/> Virtual Host-level setting overrides Server-level setting. Default values:<br/><br/> <b>Server-level:</b> No<br/><br/> <b>VH-Level:</b> Inherit Server-level setting</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="fileUpload"><h3>File Upload<span class="ls-permlink"><a href="#fileUpload"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Provides additional security functionality when uploading files by using a Request Body Parser to parse files to a server local directory where they can be easily scanned for malicious intent by third party modules. Request Body Parser is used when <span class="tagl"><a href="#uploadPassByPath">Pass Upload Data by File Path</a></span> is enabled or a module calls LSIAPI’s set_parse_req_body in the LSI_HKPT_HTTP_BEGIN level. API examples provided in source package.</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>Temporary File Path<span class="ls-permlink"><a href="#uploadTmpDir"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Temporary directory where files being uploaded to server will be stored while request body parser is working. Default value is <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>Temporary File Permissions<span class="ls-permlink"><a href="#uploadTmpFilePermission"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Determines file permissions used for files stored in temporary directory. Server level setting is global, can be overridden at VHost level.</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>Pass Upload Data by File Path<span class="ls-permlink"><a href="#uploadPassByPath"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specify whether or not to pass upload file data by path. If enabled, file path along with some other information is sent to backend handler instead of file itself when uploading. This saves on CPU resources and file transfer time but requires some updates to backend to implement. If disabled, file content will be transferred to backend handler, request body is still parsed to files.</p> <h4>Syntax</h4><p>Select from radio box</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Enable this to speed up file upload processing if backward compatibility is not an issue.</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>Example</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>DB Name<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 database name. As of GeoIP2, this setting is required.<br/><br/> When upgrading from a GeoIP to a GeoIP2, using values "COUNTRY_DB", "CITY_DB", or "ASN_DB" for this setting will automatically populate PHP's $_SERVER variable with some GeoIP compatible entries (listed by DB Name value below) to help ease this transition.<br/><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>Example</h4><div class="ls-example">COUNTRY_DB</div></article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxMindDBEnv"><h3>Environment Variables<span class="ls-permlink"><a href="#maxMindDBEnv"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Assign the results of database lookups to environment variables.</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>Example</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 DB File Path<span class="ls-permlink"><a href="#ip2locDBFile"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>The location of a valid database file.</p> <h4>Syntax</h4><p>Filename which can be an absolute path or a relative path to $SERVER_ROOT.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="ip2locDBCache"><h3>DB Cache Type<span class="ls-permlink"><a href="#ip2locDBCache"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>The caching method used. The default value is <span class="val">Memory</span>.</p> <h4>Syntax</h4><p>Select from drop down list</p> </article> </div>
</section>
</article><div class="ls-col-1-1"><footer class="copyright">Copyright © 2013-2018. <a href="https://www.litespeedtech.com">LiteSpeed Technologies Inc.</a> All rights reserved.</footer>
</div></div>
</body>
</html>