summaryrefslogtreecommitdiffstats
path: root/docs/manual/vhosts/index.xml.zh-cn
blob: ed20bfb9887084dfb28a90cf261c8b999149f28b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?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:1753872 (outdated) -->

<!--
 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>