index.html.en revision 45632c3574ce843b9e85b9f73efe75b7b809f789
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen<html xmlns="http://www.w3.org/1999/xhtml">
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <head>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <meta name="generator" content="HTML Tidy, see www.w3.org" />
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <title>Apache Virtual Host documentation</title>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen </head>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen vlink="#000080" alink="#FF0000">
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <!--#include virtual="header.html" -->
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
210ac7f213498949b68ee13b33fd9324d08ff81frbowen <h1 align="center">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
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <samp>www.company1.com</samp> and <samp>www.company2.com</samp>)
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen on a single machine. Virtual hosts can be "<a
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen href="ip-based.html">IP-based</a>," meaning that you have a
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen different IP address for every web site, or "<a
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen href="name-based.html">name-based</a>," meaning that you have
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen multiple names running on a single IP address. The fact that they
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen are running on the same server is not apparent to the 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 <hr />
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <h2>Virtual Host Support</h2>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <ul>
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><a href="name-based.html">Name-based Virtual Hosts</a> (One IP
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen address, multiple web sites)</li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen address for each web site)</li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><a href="examples.html">Virtual Host examples for common
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen setups</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <em>Too many log files</em>)</li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <li><a href="mass.html">Dynamically Configured Mass Virtual
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen Hosting</a></li>
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><a href="details.html">In-Depth Discussion of Virtual Host
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen Matching</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen </ul>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <h2>Configuration directives</h2>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <ul>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <li><a
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen href="/mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <li><a
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen href="/mod/core.html#namevirtualhost">NameVirtualHost</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <li><a href="/mod/core.html#servername">ServerName</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><a href="/mod/core.html#serveralias">ServerAlias</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <li><a href="/mod/core.html#serverpath">ServerPath</a></li>
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen
10ca15b877e1d7f36b5d4ccd0a38e984cd635da4rbowen <li><b>See also</b> <a
210ac7f213498949b68ee13b33fd9324d08ff81frbowen href="/mod/mod_vhost_alias.html">mod_vhost_alias</a></li>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen </ul>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <p>If you are trying to debug your virtual host configuration, you
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen may find the Apache <code>-t -D DUMP_VHOSTS</code> command line switch
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen useful. That is, type the following command:</p>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen /usr/local/apache/bin/httpd -t -D DUMP_VHOSTS
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen </code></td></tr></table></blockquote>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen <p>This command will dump out a description of how Apache parsed
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen the configuration file. Careful examination of the IP addresses and
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen server names may help uncover configuration mistakes. (See <a
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen href="/programs/httpd.html">the docs for the httpd program</a> for
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen other command line options)</p>
48160cfe05c7614376dc7b1f57f5493eb73f06dbrbowen
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen <!--#include virtual="footer.html" -->
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen </body>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen</html>
2eaf662cbc81e823e8d9aeb8d54e69e63032493erbowen