1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <manualpage metafile="index.xml.meta">
24 <parentdocument href="../"/>
26 <title>Apache Virtual Host documentation</title>
30 <p>The term <cite>Virtual Host</cite> refers to the practice of
31 running more than one web site (such as
32 <code>company1.example.com</code> and <code>company2.example.com</code>)
33 on a single machine. Virtual hosts can be "<a
34 href="ip-based.html">IP-based</a>", meaning that you have a
35 different IP address for every web site, or "<a
36 href="name-based.html">name-based</a>", meaning that you have
37 multiple names running on each IP address. The fact that they
38 are running on the same physical server is not apparent to the
41 <p>Apache was one of the first servers to support IP-based
42 virtual hosts right out of the box. Versions 1.1 and later of
43 Apache support both IP-based and name-based virtual hosts
44 (vhosts). The latter variant of virtual hosts is sometimes also
45 called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
47 <p>Below is a list of documentation pages which explain all
48 details of virtual host support in Apache HTTP Server:</p>
52 <seealso><module>mod_vhost_alias</module></seealso>
53 <seealso><a href="name-based.html">Name-based virtual
55 <seealso><a href="ip-based.html">IP-based virtual hosts</a></seealso>
56 <seealso><a href="examples.html">Virtual host examples</a></seealso>
57 <seealso><a href="fd-limits.html">File descriptor limits</a></seealso>
58 <seealso><a href="mass.html">Mass virtual hosting</a></seealso>
59 <seealso><a href="details.html">Details of host matching</a></seealso>
61 <section id="support"><title>Virtual Host Support</title>
64 <li><a href="name-based.html">Name-based Virtual Hosts</a> (More
65 than one web site per IP address)</li>
66 <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
67 address for each web site)</li>
68 <li><a href="examples.html">Virtual Host examples for common
70 <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
71 <em>Too many log files</em>)</li>
72 <li><a href="mass.html">Dynamically Configured Mass Virtual
74 <li><a href="details.html">In-Depth Discussion of Virtual Host
80 <section id="directives"><title>Configuration directives</title>
83 <li><directive type="section"
84 module="core">VirtualHost</directive></li>
85 <li><directive module="core">ServerName</directive></li>
86 <li><directive module="core">ServerAlias</directive></li>
87 <li><directive module="core">ServerPath</directive></li>
90 <p>If you are trying to debug your virtual host configuration, you
91 may find the Apache <code>-S</code> command line switch
92 useful. That is, type the following command:</p>
95 /usr/local/apache2/bin/httpd -S
98 <p>This command will dump out a description of how Apache parsed
99 the configuration file. Careful examination of the IP addresses and
100 server names may help uncover configuration mistakes. (See
101 the docs for the <program>httpd</program> program for
102 other command line options)</p>