index.xml revision ffec3e56ff5331a2d732ec07e9d107303fed43f4
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<?xml version='1.0' encoding='UTF-8' ?>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<!-- $LastChangedRevision$ -->
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<!--
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd Licensed to the Apache Software Foundation (ASF) under one or more
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd contributor license agreements. See the NOTICE file distributed with
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd this work for additional information regarding copyright ownership.
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd The ASF licenses this file to You under the Apache License, Version 2.0
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd (the "License"); you may not use this file except in compliance with
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd the License. You may obtain a copy of the License at
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd http://www.apache.org/licenses/LICENSE-2.0
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd Unless required by applicable law or agreed to in writing, software
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd distributed under the License is distributed on an "AS IS" BASIS,
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd See the License for the specific language governing permissions and
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd limitations under the License.
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd-->
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<manualpage metafile="index.xml.meta">
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<parentdocument href="../"/>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <title>Apache Virtual Host documentation</title>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<summary>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <p>The term <cite>Virtual Host</cite> refers to the practice of
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd running more than one web site (such as
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <code>company1.example.com</code> and <code>company2.example.com</code>)
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd on a single machine. Virtual hosts can be "<a
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd href="ip-based.html">IP-based</a>", meaning that you have a
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd different IP address for every web site, or "<a
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd href="name-based.html">name-based</a>", meaning that you have
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd multiple names running on each IP address. The fact that they
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd are running on the same physical server is not apparent to the
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd end user.</p>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <p>Apache was one of the first servers to support IP-based
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd virtual hosts right out of the box. Versions 1.1 and later of
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd Apache support both IP-based and name-based virtual hosts
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd (vhosts). The latter variant of virtual hosts is sometimes also
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <p>Below is a list of documentation pages which explain all
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd details of virtual host support in Apache HTTP Server:</p>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd</summary>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><module>mod_vhost_alias</module></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><a href="name-based.html">Name-based virtual
d3a9ab99d53a956d1c5ee9ef343188b508a80058ndhosts</a></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><a href="ip-based.html">IP-based virtual hosts</a></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><a href="examples.html">Virtual host examples</a></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><a href="fd-limits.html">File descriptor limits</a></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><a href="mass.html">Mass virtual hosting</a></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<seealso><a href="details.html">Details of host matching</a></seealso>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<section id="support"><title>Virtual Host Support</title>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <ul>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><a href="name-based.html">Name-based Virtual Hosts</a> (More
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd than one web site per IP address)</li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd address for each web site)</li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><a href="examples.html">Virtual Host examples for common
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd setups</a></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <em>Too many log files</em>)</li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><a href="mass.html">Dynamically Configured Mass Virtual
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd Hosting</a></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><a href="details.html">In-Depth Discussion of Virtual Host
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd Matching</a></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd </ul>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd</section>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd<section id="directives"><title>Configuration directives</title>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <ul>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><directive type="section"
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd module="core">VirtualHost</directive></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><directive module="core">ServerName</directive></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><directive module="core">ServerAlias</directive></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <li><directive module="core">ServerPath</directive></li>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd </ul>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <p>If you are trying to debug your virtual host configuration, you
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd may find the Apache <code>-S</code> command line switch
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd useful. That is, type the following command:</p>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <example>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd /usr/local/apache2/bin/httpd -S
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd </example>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd <p>This command will dump out a description of how Apache parsed
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd the configuration file. Careful examination of the IP addresses and
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd server names may help uncover configuration mistakes. (See
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd the docs for the <program>httpd</program> program for
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd other command line options)</p>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd</section>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd</manualpage>
d3a9ab99d53a956d1c5ee9ef343188b508a80058nd