index.html.en revision 80d3dc69b0e6ad772135f6a78af3d16bd6cccc42
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess<?xml version="1.0" encoding="ISO-8859-1"?>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess This file is generated from xml source: DO NOT EDIT
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
d8b1dfd3ecab967303893dd6e5072f15aa393ca6nd --><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.1</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.1</a></div><div id="page-content"><div id="preamble"><h1>Apache Virtual Host documentation</h1>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <p>The term <cite>Virtual Host</cite> refers to the practice of
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen running more than one web site (such as
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <code>www.company1.com</code> and <code>www.company2.com</code>)
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess on a single machine. Virtual hosts can be "<a href="ip-based.html">IP-based</a>," meaning that you have a
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess different IP address for every web site, or "<a href="name-based.html">name-based</a>," meaning that you have
2bd55c0d474884fe40c4a081efcbd82bc1c913a8rbowen multiple names running on each IP address. The fact that they
2bd55c0d474884fe40c4a081efcbd82bc1c913a8rbowen are running on the same physical server is not apparent to the
2bd55c0d474884fe40c4a081efcbd82bc1c913a8rbowen end user.</p>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <p>Apache was one of the first servers to support IP-based
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen virtual hosts right out of the box. Versions 1.1 and later of
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen Apache support both IP-based and name-based virtual hosts
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen (vhosts). The latter variant of virtual hosts is sometimes also
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <p>Below is a list of documentation pages which explain all
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen details of virtual host support in Apache version 1.3 and
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen later.</p>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess</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>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <code class="module"><a href="/mod/mod_vhost_alias.html">mod_vhost_alias</a></code>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess</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>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <ul>
2bd55c0d474884fe40c4a081efcbd82bc1c913a8rbowen <li><a href="name-based.html">Name-based Virtual Hosts</a> (More
2bd55c0d474884fe40c4a081efcbd82bc1c913a8rbowen than one web site per IP address)</li>
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen address for each web site)</li>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><a href="examples.html">Virtual Host examples for common
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen setups</a></li>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <em>Too many log files</em>)</li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <li><a href="mass.html">Dynamically Configured Mass Virtual
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen Hosting</a></li>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><a href="details.html">In-Depth Discussion of Virtual Host
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen Matching</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen </ul>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess</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>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <ul>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><code class="directive"><a href="/mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><code class="directive"><a href="/mod/core.html#namevirtualhost">NameVirtualHost</a></code></li>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><code class="directive"><a href="/mod/core.html#servername">ServerName</a></code></li>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><code class="directive"><a href="/mod/core.html#serveralias">ServerAlias</a></code></li>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <li><code class="directive"><a href="/mod/core.html#serverpath">ServerPath</a></code></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen </ul>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <p>If you are trying to debug your virtual host configuration, you
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess may find the Apache <code>-t -D DUMP_VHOSTS</code> command line switch
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen useful. That is, type the following command:</p>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess <div class="example"><p><code>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen /usr/local/apache/bin/httpd -t -D DUMP_VHOSTS
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess </code></p></div>
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <p>This command will dump out a description of how Apache parsed
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen the configuration file. Careful examination of the IP addresses and
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess server names may help uncover configuration mistakes. (See <a href="/programs/httpd.html">the docs for the httpd program</a> for
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen other command line options)</p>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess</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>