File manager - Edit - /usr/local/lswsbak/docs/zh-CN/Templates_Help.html
Back
<!DOCTYPE html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>OpenLiteSpeed Users' Manual - 虚拟主机模板</title> <meta name="description" content="OpenLiteSpeed Users' Manual - 虚拟主机模板." /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="robots" content="noindex"> <link rel="shortcut icon" href="../img/favicon.ico" /> <link rel="stylesheet" type="text/css" href="../css/hdoc.css"> </head> <body> <div class="pagewrapper clearfix"><aside class="sidetree ls-col-1-5"> <figure> <img src="img/ols_logo.svg" alt="openlitespeed logo" width="150px"/> </figure> <h2 class="ls-text-thin"> OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a> </h2> <h3 class="ls-text-muted">Version 1.8 — Rev. 3</h3> <hr/> <div> <ul> <li><a href="license.html">License</a></li> <li><a href="intro.html">Introduction</a></li> <li><a href="install.html">Installation</a></li> <li> <a href="admin.html">Administration</a> <ul class="level2"> <li><a href="ServerStat_Help.html">Service Manager</a></li> <li><a href="Real_Time_Stats_Help.html">Real-Time Stats</a></li> </ul> </li> <li><a href="security.html">Security</a></li> <li> <a href="config.html">Configuration</a> <ul class="level2"> <li><a href="ServGeneral_Help.html">Server General</a></li> <li><a href="ServLog_Help.html">Server Log</a></li> <li><a href="ServTuning_Help.html">Server Tuning</a></li> <li><a href="ServSecurity_Help.html">Server Security</a></li> <li><a href="ExtApp_Help.html">External Apps</a></li> <ul class="level3"> <li><a href="External_FCGI.html">Fast CGI App</a></li> <li><a href="External_FCGI_Auth.html">Fast CGI Authorizer</a></li> <li><a href="External_LSAPI.html">LSAPI App</a></li> <li><a href="External_Servlet.html">Servlet Engine</a></li> <li><a href="External_WS.html">Web Server</a></li> <li><a href="External_PL.html">Piped logger</a></li> <li><a href="External_LB.html">Load Balancer</a></li> </ul> <li><a href="ScriptHandler_Help.html">Script Handler</a></li> <li><a href="App_Server_Help.html">App Server Settings</a></li> <li><a href="Module_Help.html">Module Configuration</a></li> <li><a href="Listeners_General_Help.html">Listener General</a></li> <li><a href="Listeners_SSL_Help.html">Listener SSL</a></li> <li><span class="current"><a href="Templates_Help.html">Virtual Host Templates</a></span></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="Listeners_SSL_Help.html">侦听器SSL</a></div><div class="center"><a href="config.html">Configuration</a></div><div class="next"><a href="VirtualHosts_Help.html">虚拟主机设置</a> »</div></div> <h1>虚拟主机模板</h1><section class="ls-spacer-small-bottom">虚拟主机模板使创建具有相似配置的新虚拟主机变得容易。 每个模板都包含一个模板配置文件,一个映射的侦听器列表以及一个成员虚拟主机列表。 要添加基于模板的虚拟主机,管理员只需将具有唯一的虚拟主机名和域名添加到模板成员列表。 模板映射的侦听器列表中的所有侦听器将自动添加到虚拟主机的映射。 稍后,如果您需要为特定虚拟主机自定义配置,只需“实例化”该成员虚拟主机,然后将自动创建一个独立的虚拟主机配置。 即使在设置自定义虚拟主机时,仍然可以用模板快速建立。</section> <h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header>模板位置</header><p> <a href="#templateName">模板名称</a> | <a href="#templateFile">模板文件</a> | <a href="#mappedListeners">映射的侦听器</a></p></section> <section class="toc-row"><header>Member Virtual Hosts</header><p> <a href="#templateVHName">虚拟主机名</a> | <a href="#templateVHDomain">域名</a> | <a href="#templateVHAliases">别名</a> | <a href="#memberVHRoot">成员虚拟主机根目录</a></p></section> <section class="toc-row"><header>模板设置</header><p> <a href="#templateVHRoot">默认虚拟主机根</a> | <a href="#templateVHConfigFile">Instantiated VHost Config file</a> | <a href="#templateVHDocRoot">文件根目标</a> | <a href="#templateFileRef">模板中的文件名</a></p></section> </section> <section><div class="helpitem"><article class="ls-helpitem"><div><header id="templateName"><h3>模板名称<span class="ls-permlink"><a href="#templateName"></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="templateFile"><h3>模板文件<span class="ls-permlink"><a href="#templateFile"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定此模板配置文件的路径。 该文件必须位于$SERVER_ROOT/conf/templates/中,且文件名带有“ .conf”。 如果您指定的文件不存在,则在尝试保存模板后,将出现错误,为“CLICK TO CREATE”。 点击该链接将生成一个新的空模板文件。 当您删除模板时,该条目将从您的配置中删除,但实际的模板配置文件不会被删除。</p> <h4>Syntax</h4><p>path</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="mappedListeners"><h3>映射的侦听器<span class="ls-permlink"><a href="#mappedListeners"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies the names of all listeners that this template maps to. A listener-to-virtual host mapping for this template's member virtual hosts will be added to the listeners specified in this field. This mapping will map listeners to virtual hosts based on the domain names and aliases set in the member virtual hosts' individual configurations.</p> <h4>Syntax</h4><p>comma-separated list</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateVHName"><h3>虚拟主机名<span class="ls-permlink"><a href="#templateVHName"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>此虚拟主机的唯一名称。 该名称在所有的虚拟主机模板和虚拟主机中不得重复。 在目录路径配置中,此名称可以由变量<span class="val">$VH_NAME</span>引用。<br/><br/> 如果还配置了具有相同名称的虚拟主机,则虚拟主机的配置将被忽略。</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateVHDomain"><h3>域名<span class="ls-permlink"><a href="#templateVHDomain"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定该成员虚拟主机的主域名。 如果留白,将使用成员虚拟主机名, 这应该是符合标准的域名,但是您也可以使用IP地址。 对于不在端口80上的网站,建议附加<span class="val">:<port></span> 对于包含域名的配置,可以使用变量<span class="val">$VH_DOMAIN</span>来引用此域。<br/><br/> 该域名将在以下情况下使用: <ol> <li>在处理请求时匹配主机标头中的主机名。</li> <li>作为诸如FrontPage或AWstats之类的域名配置.</li> <li>基于虚拟主机模板配置侦听器到虚拟主机的映射。</li> </ol></p> <h4>Syntax</h4><p>domain name</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateVHAliases"><h3>别名<span class="ls-permlink"><a href="#templateVHAliases"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定虚拟主机的备用名称。 所有可能的主机名和IP地址都应添加到此列表中。 名称中允许使用通配符 <span class="val">*</span> 和 <span class="val">?</span>。 为不在端口80上的网站附加<span class="val">:<port></span>。<br/><br/> 别名将在以下情况下使用: <ol> <li>在处理请求时匹配主机标头中的主机名。</li> <li>作为诸如FrontPage或AWstats之类的域名配置.</li> <li>基于虚拟主机模板配置侦听器到虚拟主机的映射。</li> </ol></p> <h4>Syntax</h4><p>Comma-separated list of domain names.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="memberVHRoot"><h3>成员虚拟主机根目录<span class="ls-permlink"><a href="#memberVHRoot"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定此虚拟主机的根目录。 如果留空,将使用此模板的默认虚拟主机根目录.<br/><br/> Note: 这<b>不是</b>文档根。 建议将与虚拟主机相关的所有文件(如虚拟主机配置,日志文件,html文件,CGI脚本等)放置在此目录下。 虚拟主机根目录可以以变量$VH_ROOT来引用。</p> <h4>Syntax</h4><p>path</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateVHRoot"><h3>默认虚拟主机根<span class="ls-permlink"><a href="#templateVHRoot"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>指定使用此模板的成员虚拟主机的默认根目录。. Variable <span class="val">$VH_NAME</span> must appear in the path. This will allow each member template to be automatically assigned a separate root directory based on its name.</p> <h4>Syntax</h4><p>path</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateVHConfigFile"><h3>Instantiated VHost Config file<span class="ls-permlink"><a href="#templateVHConfigFile"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies the location of the config file generated when you instantiate a member virtual host. Variable <span class="val">$VH_NAME</span> must appear in the path so each virtual host will have its own file. Must be located under $SERVER_ROOT/conf/vhosts/. This config file will be created only after you move a member vhost out of the template through instantiation.</p> <h4>Syntax</h4><p>String with $VH_NAME variable and .conf suffix</p> <h4>提示</h4><p><span title="Information" class="ls-icon-info"></span> $VH_NAME/vhconf.conf is recommended for easy management.</p> </article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateVHDocRoot"><h3>文件根目标<span class="ls-permlink"><a href="#templateVHDocRoot"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies the unique path for each member virtual host's document root. Variable <span class="val">$VH_NAME</span> or <span class="val">$VH_ROOT</span> must appear in the path so each member virtual host will have its own document root.</p> <h4>Syntax</h4><p>path with $VH_NAME or $VH_ROOT variable</p> <h4>例子</h4><div class="ls-example">$VH_ROOT/public_html/ or $SERVER_ROOT/$VH_NAME/public_html.</div></article> </div> <div class="helpitem"><article class="ls-helpitem"><div><header id="templateFileRef"><h3>模板中的文件名<span class="ls-permlink"><a href="#templateFileRef"></a></span><span class="top"><a href="#top">⇑</a></span></h3></header></div><h4>Description</h4><p>Specifies a path for the file to be used for member virtual hosts. Variable <span class="val">$VH_NAME</span> or <span class="val">$VH_ROOT</span> must appear in the path so each member virtual host will have its own file.</p> <h4>Syntax</h4><p>string</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