index.html.en revision 3b58542e01ec69422f3086db5825a12fc77b726e
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe<?xml version="1.0" encoding="ISO-8859-1"?>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe This file is generated from xml source: DO NOT EDIT
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe --><title>Apache Virtual Host documentation - Apache HTTP Server</title><link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="/images/favicon.ico" rel="shortcut icon" /></head><body id="manual-page"><div id="page-header"><p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="/images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs-project/">Documentation</a> &gt; <a href="../">Version 2.0</a></div><div id="page-content"><div id="preamble"><h1>Apache Virtual Host documentation</h1>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <p>The term <cite>Virtual Host</cite> refers to the practice of
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe running more than one web site (such as
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <code>www.company1.com</code> and <code>www.company2.com</code>)
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe on a single machine. Virtual hosts can be "<a href="ip-based.html">IP-based</a>," meaning that you have a
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe different IP address for every web site, or "<a href="name-based.html">name-based</a>," meaning that you have
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe multiple names running on a single IP address. The fact that they
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe are running on the same server is not apparent to the end user.</p>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <p>Apache was one of the first servers to support IP-based
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe virtual hosts right out of the box. Versions 1.1 and later of
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe Apache support both IP-based and name-based virtual hosts
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe (vhosts). The latter variant of virtual hosts is sometimes also
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <p>Below is a list of documentation pages which explain all
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe details of virtual host support in Apache version 1.3 and
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe later.</p>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe</div><div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#support">Virtual Host Support</a></li><li><img alt="" src="/images/down.gif" /> <a href="#directives">Configuration directives</a></li></ul><h3>See also</h3><ul class="seealso"><li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <code class="module"><a href="/mod/mod_vhost_alias.html">mod_vhost_alias</a></code>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe</li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div><div class="section"><h2><a name="support" id="support">Virtual Host Support</a></h2>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <ul>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><a href="name-based.html">Name-based Virtual Hosts</a> (One IP
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe address, multiple web sites)</li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe address for each web site)</li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><a href="examples.html">Virtual Host examples for common
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe setups</a></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <em>Too many log files</em>)</li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><a href="mass.html">Dynamically Configured Mass Virtual
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe Hosting</a></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><a href="details.html">In-Depth Discussion of Virtual Host
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe Matching</a></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe </ul>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
56e85d89d42a6980f31b800266649efbed338da3wrowe</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div><div class="section"><h2><a name="directives" id="directives">Configuration directives</a></h2>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <ul>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><code class="directive"><a href="/mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li>
37ad54b8fd2611b7a4f2b269eec3d27ed784a25dwrowe <li><code class="directive"><a href="/mod/core.html#namevirtualhost">NameVirtualHost</a></code></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><code class="directive"><a href="/mod/core.html#servername">ServerName</a></code></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><code class="directive"><a href="/mod/core.html#serveralias">ServerAlias</a></code></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <li><code class="directive"><a href="/mod/core.html#serverpath">ServerPath</a></code></li>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe </ul>
94b262d3639149df0b02642a9daa6db8bff58577wrowe
94b262d3639149df0b02642a9daa6db8bff58577wrowe <p>If you are trying to debug your virtual host configuration, you
94b262d3639149df0b02642a9daa6db8bff58577wrowe may find the Apache <code>-t -D DUMP_VHOSTS</code> command line switch
94b262d3639149df0b02642a9daa6db8bff58577wrowe useful. That is, type the following command:</p>
94b262d3639149df0b02642a9daa6db8bff58577wrowe
94b262d3639149df0b02642a9daa6db8bff58577wrowe <div class="example"><p><code>
94b262d3639149df0b02642a9daa6db8bff58577wrowe /usr/local/apache/bin/httpd -t -D DUMP_VHOSTS
94b262d3639149df0b02642a9daa6db8bff58577wrowe </code></p></div>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe <p>This command will dump out a description of how Apache parsed
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe the configuration file. Careful examination of the IP addresses and
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe server names may help uncover configuration mistakes. (See <a href="/programs/httpd.html">the docs for the httpd program</a> for
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe other command line options)</p>
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div></body></html>