index.xml.zh-cn revision 3174ed450858787dfec8bf9701e282d25e87188b
<?xml version='1.0' encoding='UTF-8' ?>
<!-- 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
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>指的是在单一机器上运行多个网站
虚拟主机可以“<a
href="ip-based.html">基于 IP</a>”,即每个 IP 一个站点;
即每个 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>
<section id="support"><title>虚拟主机支持</title>
<ul>
</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>
</example>
<p>这个命令将会显示 Apache 是如何解析配置文件的。仔细检查 IP
地址与服务器名称可能会帮助你发现配置错误
(参见 <program>httpd</program> 程序文档,以便了解其它命令行选项)。</p>
</section>
</manualpage>