File manager - Edit - /usr/local/lswsbak/docs/zh-CN/Static_Context.html
Back
<!DOCTYPE html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>OpenLiteSpeed Users' Manual - Static Context</title> <meta name="description" content="OpenLiteSpeed Users' Manual - Static Context." /> <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><span class="current"><a href="Static_Context.html">Static Context</a></span></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="Context_Help.html">Context</a></div><div class="next"><a href="Java_Web_App_Context.html">Java Web App Context</a> »</div></div> <h1>Static Context</h1><h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header><a href="#generalContext">静态Context</a></header><p> <a href="#expuri">URI</a> | <a href="#location">位置</a> | <a href="#allowBrowse">访问权限</a> | <a href="#enableExpires">启用过期</a> | <a href="#expiresDefault">默认过期</a> | <a href="#expiresByType">按类型过期</a> | <a href="#extraHeaders">标头控制</a> | <a href="#addMIMEType">MIME类型</a> | <a href="#forceType">强制MIME类型</a> | <a href="#defaultType">默认MIME类型</a> | <a href="#indexFiles">索引文件</a> | <a href="#autoIndex">自动索引</a> | <a href="#realm">域</a> | <a href="#authName">认证名称</a> | <a href="#required">Require(授权的用户/组)</a> | <a href="#accessAllowed">允许访问列表</a> | <a href="#accessDenied">拒绝访问列表</a> | <a href="#extAuthorizer">Authorizer</a> | <a href="#addDefaultCharset">添加默认的字符集</a> | <a href="#defaultCharsetCustomized">自定义默认字符集</a> | <a href="#enableRewrite">启用重写</a> | <a href="#rewriteInherit">重写继承</a> | <a href="#rewriteBase">重写基准</a> | <a href="#rewriteRules">重写规则</a> | <a href="#enableIpGeo">启用IP地理定位</a> | <a href="#phpIniOverride">php.ini 重写</a></p></section> </section> <section><div class="helpitem"><article class="ls-helpitem"><div><header id="generalContext"><h3>静态Context<span class="ls-permlink"><a href="#generalContext"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Context settings are used to specify special settings for files in a certain location. These settings can be used to bring in files outside of the document root (like Apache's Alias or AliasMatch directives), to protect a particular directory using authorization realms, or to block or restrict access to a particular directory within the document root.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="expuri"><h3>URI<span class="ls-permlink"><a href="#expuri"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies the URI for this context.</p> <h4>Syntax</h4><p>指定此context下的URI。这个URI应该以"/"开始。 如果一个URI以"/"结束,那么该context将包含这个URI下的所有下级URI。如果context类型映射到系统目录上,则必须添加结尾的"/"</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#location">位置</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="location"><h3>位置<span class="ls-permlink"><a href="#location"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定此context在文件系统中的对应位置。<br/><br/> Default value: $DOC_ROOT + <span class="tagl"><a href="#expuri">URI</a></span></p> <h4>Syntax</h4><p>It can be an absolute path or path relative to $SERVER_ROOT, $VH_ROOT, or $DOC_ROOT. $DOC_ROOT is the default relative path, and can be omitted.<br/><br/> If the <span class="tagl"><a href="#expuri">URI</a></span> is a regular expression, then the matched sub-string can be used to form the "Root" string. The matched sub-string can be referenced with the values "$1" - "$9". "$0" and "&" can be used to reference the whole matched string. Additionally, a query string can be set by appending a "?" followed by the query string. Be careful. "&" should be escaped as "\&" in the query string.</p> <h4>例子</h4><div class="ls-example">A plain URI like <span class="val">/examples/</span> with <span class="tagl"><a href="#location">位置</a></span> set to <span class="val">/home/john/web_examples</span> will map the request "/examples/foo/bar.html" to file "/home/john/web_examples/foo/bar.html".<br/> To simulate Apache's mod_userdir, set URI to <span class="val">exp: ^/~([A-Za-z0-9]+)(.*)</span>, set <span class="tagl"><a href="#location">位置</a></span> to <span class="val">/home/$1/public_html$2</span>. With these settings, a request of URI /~john/foo/bar.html will map to file /home/john/public_html/foo/bar.html.</div><h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#expuri">URI</a></span></p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="allowBrowse"><h3>访问权限<span class="ls-permlink"><a href="#allowBrowse"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否可以访问此context 。 设置为<span class="val">否</span>以拒绝访问。 您可以使用此功能来防止访问指定目录。 您可以在更新此context内容或此目录中有特殊数据时使用它。</p> <h4>Syntax</h4><p>从单选框选择</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="extraHeaders"><h3>标头控制<span class="ls-permlink"><a href="#extraHeaders"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定要添加的附加响应/请求头。可以添加每行一个来添加多个头指令。"NONE "可以用来禁止父头继承。如果没有提供,则假定为 "Header"。</p> <h4>Syntax</h4><p>[Header]|RequestHeader [condition] set|append|merge|add|unset header [value] [early|env=[!]variable]</p> <h4>例子</h4><div class="ls-example">set Cache-control no-cache<br/> append Cache-control no-store<br/> Header set My-header cust_header_val<br/> RequestHeader set My-req-header cust_req_header_val</div><h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> 语法和用法类似于 <a href="https://httpd.apache.org/docs/2.2/mod/mod_headers.html#header" target="_blank" rel="noopener noreferrer">Apache's mod_headers directives</a><br/><br/> <span title="Information" class="ls-icon-info"></span> The 'Header' directive is is optional and can be excluded or left in when copying rules from elsewhere without issue.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="addMIMEType"><h3>MIME类型<span class="ls-permlink"><a href="#addMIMEType"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>为此context指定的其他MIME类型的映射. 新映射将覆盖此context及其子context下的现有映射。<br/> 如果要将PHP脚本显示为文本文件而不是作为脚本执行,则只需覆盖.php映射到MIME类型"text/plain"</p> <h4>Syntax</h4><p>MIME-type1 extension extension ..., MIME-type2 extension ... Use comma to separate between MIME types, use space to separate multiple extensions.</p> <h4>例子</h4><div class="ls-example"><span class="val">image/jpg jpeg jpg, image/gif gif</span></div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="forceType"><h3>强制MIME类型<span class="ls-permlink"><a href="#forceType"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定后,无论文件后缀如何, 此context下的所有文件都将用作具有指定MIME类型的静态文件。 设置为<span class="val">NONE</span>时,将禁用强制MIME类型。</p> <h4>Syntax</h4><p>MIME type or NONE.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="defaultType"><h3>默认MIME类型<span class="ls-permlink"><a href="#defaultType"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>定后,当MIME类型映射不能由文档的后缀确定或没有后缀时,将使用此类型。如果未指定,将使用默认值<span class="val">application/octet-stream</span>。</p> <h4>Syntax</h4><p>MIME-type</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="realm"><h3>域<span class="ls-permlink"><a href="#realm"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定这个context下的realm授权。 当指定时,必须提供有效的用户和用户名来访问这个context。 <span class="tagl"><a href="VHSecurity_Help.html#realms">Realms授权</a></span>需要在<span class="tagP"><a href="#VHSecurity_Help">虚拟主机安全</a></span>部分进行设置。 此设置使用每个realm的<span class="tagl"><a href="VHSecurity_Help.html#realmName">域名称</a></span>。</p> <h4>Syntax</h4><p>从列表中选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="authName"><h3>认证名称<span class="ls-permlink"><a href="#authName"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>为当前context下的realm认证指定一个替代的名称。 如果没有指定,原realm名称将被使用。 认证名称将显示在浏览器登陆弹出窗口。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="required"><h3>Require(授权的用户/组)<span class="ls-permlink"><a href="#required"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定哪些用户/用户组可以访问此context。 这里允许你使用一个用户/组数据库(在 <span class="tagl"><a href="#realm">域</a></span>中指定)访问多个context, 但只允许该数据库下特定的用户/组访问这个context。</p> <h4>Syntax</h4><p>Syntax is compatible with Apache's Require directive. For example: <ul> <li><span class="val">user username [username ...]</span><br/> Only listed users can access this context.</li> <li> <span class="val">group groupid [groupid ...]</span><br/> Only users belonging to the listed groups can access this context.</li> </ul> If this setting is not specified, all valid users will be allowed to access this resource.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="accessAllowed"><h3>允许访问列表<span class="ls-permlink"><a href="#accessAllowed"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定允许访问这个context下资源的IP地址或子网。综合 <span class="tagl"><a href="#accessDenied">拒绝访问列表</a></span>项的配置以及服务器/虚拟主机级别访问控制, 可访问性将以客户端IP所符合的最小范围来确定。</p> <h4>Syntax</h4><p>Comma-delimited list of IPs/sub-networks.</p> <h4>例子</h4><div class="ls-example">网络可以写成<span class="val">192.168.1.0/255.255.255.0</span>, <span class="val">192.168.1</span> 或<span class="val">192.168.1.*</span>。</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="accessDenied"><h3>拒绝访问列表<span class="ls-permlink"><a href="#accessDenied"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定哪个IP地址或子网不被允许访问这个context下的资源。 综合<span class="tagl"><a href="#accessAllowed">允许访问列表</a></span>项的配置以及服务器/虚拟主机级别访问控制, 可访问性将以客户端IP所符合的最小范围来确定。</p> <h4>Syntax</h4><p>Comma-delimited list of IPs/sub-networks.</p> <h4>例子</h4><div class="ls-example">子网络可以写成<span class="val">192.168.1.0/255.255.255.0</span>, <span class="val">192.168.1</span> 或<span class="val">192.168.1.*</span>。</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="extAuthorizer"><h3>Authorizer<span class="ls-permlink"><a href="#extAuthorizer"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定可用于生成授权/未授权 decisions的外部应用程序。 目前,仅FastCGI授权器可用。 有关FastCGI授权者角色的更多详细信息, 请访问<a href="https://fastcgi-archives.github.io/" target="_blank" rel="noopener noreferrer">https://fastcgi-archives.github.io/</a>。</p> <h4>Syntax</h4><p>从列表中选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="addDefaultCharset"><h3>添加默认的字符集<span class="ls-permlink"><a href="#addDefaultCharset"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>S指定当内容类型是"text/html"或"text/plain"且没有参数时,是否添加字符集标记到"Content-Type"响应报头中。当设置为<span class="val">Off</span>时,该功能禁用。当设置为<span class="val">On</span>时,将添加<span class="tagl"><a href="#defaultCharsetCustomized">自定义默认字符集</a></span>中指定的字符集,如果没有指定,将添加默认的"iso-8859-1"字符集。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="defaultCharsetCustomized"><h3>自定义默认字符集<span class="ls-permlink"><a href="#defaultCharsetCustomized"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定一个字符集当<span class="tagl"><a href="#addDefaultCharset">添加默认的字符集</a></span>是<span class="val">On</span>时使用。这是可选的。默认值是<span class="val">iso-8859-1</span>。当<span class="tagl"><a href="#addDefaultCharset">添加默认的字符集</a></span>是<span class="val">Off</span>时本设置将不生效。</p> <h4>Syntax</h4><p>Name of a character set.</p> <h4>例子</h4><div class="ls-example">utf-8</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="enableRewrite"><h3>启用重写<span class="ls-permlink"><a href="#enableRewrite"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否启用LiteSpeed的URL重写. 可以在虚拟主机或context级别上自定义此选项, 并且沿目录树继承该选项,直到被其他选项覆。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="rewriteInherit"><h3>重写继承<span class="ls-permlink"><a href="#rewriteInherit"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定是否从父级context继承重写规则。 如果启用重写但不继承,将启用本context的重写基准及重写规则。</p> <h4>Syntax</h4><p>从单选框选择</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="rewriteBase"><h3>重写基准<span class="ls-permlink"><a href="#rewriteBase"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定重写规则的基准URL。</p> <h4>Syntax</h4><p>URL</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="rewriteRules"><h3>重写规则<span class="ls-permlink"><a href="#rewriteRules"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定虚拟主机级别的重写规则。<br/><br/> 请勿在此处添加任何目录级重写规则。 如果您在.htaccess有任何目录级的重写规则,则应该使用uri"/"创建一个静态context, 并在那里添加重写规则。 <br/><br/> 重写规则由一个<span class="val">RewriteRule</span>组成,并可可以在多个<span class="val">RewriteCond</span>之后。 <ul> <li>每行仅能有一条规则</li> <li> <span class="val">RewriteCond</span> 和 <span class="val">RewriteRule</span> 遵循Apache的rewrite语法。 只需从Apache配置文件中复制并粘贴重写规则即可。 </li> <li> LiteSpeed和Apache mod_rewrite之间有细微差别: <ul> <li> <span class="val">%\{LA-U:variable\}</span> and <span class="val">%\{LA-F:variable\}</span> 在Litespeed 重写中将被忽略 </li> <li> Litespeed中加入了两个新变量: <span class="val">%\{CURRENT_URI\}</span>表示正在处理的URL <span class="val">%\{SCRIPT_NAME\}</span>表示为相应的CGI环境变量。 </li> <li> Litespeed在遇到<span class="val">[L]</span>后为了避免循环将停止处理此及此后的重写规则 而Apache mod_rewrite将仅停止处理该条重写规则。此行为类似于apachemod_rewrite中的<span class="val">[END]</span>标志。 </li> </ul> </li> </ul><br/> LiteSpeed的重写规则遵循Apache的重写规范。 有关重写规则的更多详细信息,请参阅 <a href=" http://httpd.apache.org/docs/current/mod/mod_rewrite.html " target="_blank" rel="noopener noreferrer"> Apache's mod_rewrite document(英文文档) </a> 和 <a href=" http://httpd.apache.org/docs/current/rewrite/ " target="_blank" rel="noopener noreferrer"> Apache's URL rewriting guide(英文文档) </a>.</p> <h4>Syntax</h4><p>string</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="phpIniOverride"><h3>php.ini 重写<span class="ls-permlink"><a href="#phpIniOverride"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>用于覆盖当前context(虚拟主机级别或context级别)中的php.ini设置。<br/><br/> 支持的指令是:<br/> php_value<br/> php_flag<br/> php_admin_value<br/> php_admin_flag<br/><br/> 所有其他行/指令将被忽略。</p> <h4>Syntax</h4><p>Override syntax is similar to Apache, a newline separated list of directives and their values with each directive being prepended by php_value, php_flag, php_admin_value, or php_admin_flag appropriately.</p> <h4>例子</h4><div class="ls-example">php_value include_path ".:/usr/local/lib/php"<br/> php_admin_flag engine on<br/> php_admin_value open_basedir "/home"</div></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