<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.zh-cn.xsl"?>
<!-- English revision : 1053231 -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<manualpage metafile="index.xml.meta">
<parentdocument href="../"/>

   <title>Apache 虚拟主机文档</title>

<summary>

    <p>术语<cite>虚拟主机</cite>指的是在单一机器上运行多个网站
    (例如 <code>company1.example.com</code> 和
    <code>company2.example.com</code>) 。
    虚拟主机可以“<a
    href="ip-based.html">基于 IP</a>”，即每个 IP 一个站点；
    或者“<a href="name-based.html">基于名称</a>”，
    即每个 IP 多个站点。这些站点运行在同一物理服务器上的事实不会明显的透漏给最终用户。</p>

    <p>Apache 是第一个支持基于 IP 的虚拟主机的服务器。
    Apache 版本 1.1 和更新的版本同时支持基于 IP 和基于名称的虚拟主机。
    基于名称的虚拟主机有时候称为<em>基于主机</em>或<em>非 IP</em> 的虚拟主机.</p>

    <p>以下解释是在 Apache 中支持虚拟主机的所有详细信息的文档页面列表。</p>

</summary>

<seealso><module>mod_vhost_alias</module></seealso>
<seealso><a href="name-based.html">基于名称的虚拟主机</a></seealso>
<seealso><a href="ip-based.html">基于 IP 的虚拟主机</a></seealso>
<seealso><a href="examples.html">虚拟主机样例</a></seealso>
<seealso><a href="fd-limits.html">文件句柄限制</a></seealso>
<seealso><a href="mass.html">动态配置的大规模虚拟主机</a></seealso>
<seealso><a href="details.html">虚拟主机匹配的深入讨论</a></seealso>

<section id="support"><title>虚拟主机支持</title>

    <ul>
      <li><a href="name-based.html">基于名称的虚拟主机</a> (每个 IP 多个站点)</li>
      <li><a href="ip-based.html">基于 IP 的虚拟主机</a> (每个 IP 一个站点)</li>
      <li><a href="examples.html">虚拟主机样例</a></li>
      <li><a href="fd-limits.html">文件句柄限制</a> (或者<em>日志文件太多</em>)</li>
      <li><a href="mass.html">动态配置的大规模虚拟主机</a></li>
      <li><a href="details.html">虚拟主机匹配的深入讨论</a></li>
    </ul>

</section>

<section id="directives"><title>配置指令</title>

    <ul>
      <li><directive type="section"
           module="core">VirtualHost</directive></li>
      <li><directive module="core">ServerName</directive></li>
      <li><directive module="core">ServerAlias</directive></li>
      <li><directive module="core">ServerPath</directive></li>
    </ul>

    <p>如果你要调试虚拟主机配置，你会发现 Apache 的命令行参数 <code>-S</code>
    非常有用。即输入以下命令:</p>

    <example>
    /usr/local/apache2/bin/httpd -S
    </example>

    <p>这个命令将会显示 Apache 是如何解析配置文件的。仔细检查 IP
    地址与服务器名称可能会帮助你发现配置错误
    (参见 <program>httpd</program> 程序文档，以便了解其它命令行选项)。</p>

</section>
</manualpage>
