index.html.en revision a43bfa789f4e52dde53ae8e53fa0427b5c1cf977
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe<?xml version="1.0" encoding="ISO-8859-1"?>
19d8729755d7f4d9503029a628dacbbdabcd2264wrowe<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
167c53d624e82d105b1517e9599195a30ddb5de8stoddard XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
167c53d624e82d105b1517e9599195a30ddb5de8stoddard This file is generated from xml source: DO NOT EDIT
167c53d624e82d105b1517e9599195a30ddb5de8stoddard XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe -->
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<title>Apache Virtual Host documentation - Apache HTTP Server</title>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<link href="/images/favicon.ico" rel="shortcut icon" /></head>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<body id="manual-page"><div id="page-header">
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<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>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<p class="apache">Apache HTTP Server Version 2.1</p>
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe<img alt="" src="/images/feather.gif" /></div>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<div id="path">
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<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>
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe<div class="toplang">
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe<p><span>Available Languages: </span><a href="/de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<a href="/en/vhosts/" title="English">&nbsp;en&nbsp;</a> |
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<a href="/ja/vhosts/" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<a href="/ko/vhosts/" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
19d8729755d7f4d9503029a628dacbbdabcd2264wrowe</div>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard
167c53d624e82d105b1517e9599195a30ddb5de8stoddard
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <p>The term <cite>Virtual Host</cite> refers to the practice of
167c53d624e82d105b1517e9599195a30ddb5de8stoddard running more than one web site (such as
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <code>www.company1.com</code> and <code>www.company2.com</code>)
167c53d624e82d105b1517e9599195a30ddb5de8stoddard on a single machine. Virtual hosts can be "<a href="ip-based.html">IP-based</a>", meaning that you have a
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe different IP address for every web site, or "<a href="name-based.html">name-based</a>", meaning that you have
167c53d624e82d105b1517e9599195a30ddb5de8stoddard multiple names running on each IP address. The fact that they
167c53d624e82d105b1517e9599195a30ddb5de8stoddard are running on the same physical server is not apparent to the
167c53d624e82d105b1517e9599195a30ddb5de8stoddard end user.</p>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <p>Apache was one of the first servers to support IP-based
167c53d624e82d105b1517e9599195a30ddb5de8stoddard virtual hosts right out of the box. Versions 1.1 and later of
167c53d624e82d105b1517e9599195a30ddb5de8stoddard Apache support both IP-based and name-based virtual hosts
167c53d624e82d105b1517e9599195a30ddb5de8stoddard (vhosts). The latter variant of virtual hosts is sometimes also
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <p>Below is a list of documentation pages which explain all
167c53d624e82d105b1517e9599195a30ddb5de8stoddard details of virtual host support in Apache version 1.3 and
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe later.</p>
56e85d89d42a6980f31b800266649efbed338da3wrowe
1f2f357528d122de2c7886a073b4eee8766d5c95wrowe</div>
1f2f357528d122de2c7886a073b4eee8766d5c95wrowe<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#support">Virtual Host Support</a></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<li><img alt="" src="/images/down.gif" /> <a href="#directives">Configuration directives</a></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard</ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="/mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li><li><a href="name-based.html">Name-based virtual
167c53d624e82d105b1517e9599195a30ddb5de8stoddardhosts</a></li><li><a href="ip-based.html">IP-based virtual hosts</a></li><li><a href="examples.html">Virtual host examples</a></li><li><a href="fd-limits.html">File descriptor limits</a></li><li><a href="mass.html">Mass virtual hosting</a></li><li><a href="details.html">Details of host matching</a></li></ul></div>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<div class="section">
167c53d624e82d105b1517e9599195a30ddb5de8stoddard<h2><a name="support" id="support">Virtual Host Support</a></h2>
dcf1a2f80f16265f00fe147de1dbd91af9c32a42wrowe
3082ab8b90e027fa27680f140987ea7e20df5088wrowe <ul>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><a href="name-based.html">Name-based Virtual Hosts</a> (More
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe than one web site per IP address)</li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
167c53d624e82d105b1517e9599195a30ddb5de8stoddard address for each web site)</li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><a href="examples.html">Virtual Host examples for common
167c53d624e82d105b1517e9599195a30ddb5de8stoddard setups</a></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <em>Too many log files</em>)</li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><a href="mass.html">Dynamically Configured Mass Virtual
167c53d624e82d105b1517e9599195a30ddb5de8stoddard Hosting</a></li>
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe <li><a href="details.html">In-Depth Discussion of Virtual Host
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe Matching</a></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard </ul>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard
26b9ccb55ff33097af4914f2e4bd36fec99a039dwrowe</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe<div class="section">
1f2f357528d122de2c7886a073b4eee8766d5c95wrowe<h2><a name="directives" id="directives">Configuration directives</a></h2>
1f2f357528d122de2c7886a073b4eee8766d5c95wrowe
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <ul>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><code class="directive"><a href="/mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><code class="directive"><a href="/mod/core.html#namevirtualhost">NameVirtualHost</a></code></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><code class="directive"><a href="/mod/core.html#servername">ServerName</a></code></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><code class="directive"><a href="/mod/core.html#serveralias">ServerAlias</a></code></li>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <li><code class="directive"><a href="/mod/core.html#serverpath">ServerPath</a></code></li>
dcf1a2f80f16265f00fe147de1dbd91af9c32a42wrowe </ul>
dcf1a2f80f16265f00fe147de1dbd91af9c32a42wrowe
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <p>If you are trying to debug your virtual host configuration, you
167c53d624e82d105b1517e9599195a30ddb5de8stoddard may find the Apache <code>-S</code> command line switch
167c53d624e82d105b1517e9599195a30ddb5de8stoddard useful. That is, type the following command:</p>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <div class="example"><p><code>
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe /usr/local/apache2/bin/httpd -S
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe </code></p></div>
167c53d624e82d105b1517e9599195a30ddb5de8stoddard
167c53d624e82d105b1517e9599195a30ddb5de8stoddard <p>This command will dump out a description of how Apache parsed
990e1969a428b8844e07aad088df41340cd009d4wrowe the configuration file. Careful examination of the IP addresses and
4439ba95daf7b82794fe338726790e2dab89d119wrowe server names may help uncover configuration mistakes. (See <a href="/programs/httpd.html">the docs for the httpd program</a> for
4439ba95daf7b82794fe338726790e2dab89d119wrowe other command line options)</p>
4439ba95daf7b82794fe338726790e2dab89d119wrowe
4439ba95daf7b82794fe338726790e2dab89d119wrowe</div></div>
4439ba95daf7b82794fe338726790e2dab89d119wrowe<div class="bottomlang">
4439ba95daf7b82794fe338726790e2dab89d119wrowe<p><span>Available Languages: </span><a href="/de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
4439ba95daf7b82794fe338726790e2dab89d119wrowe<a href="/en/vhosts/" title="English">&nbsp;en&nbsp;</a> |
4439ba95daf7b82794fe338726790e2dab89d119wrowe<a href="/ja/vhosts/" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
4439ba95daf7b82794fe338726790e2dab89d119wrowe<a href="/ko/vhosts/" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
4439ba95daf7b82794fe338726790e2dab89d119wrowe</div><div id="footer">
4439ba95daf7b82794fe338726790e2dab89d119wrowe<p class="apache">Copyright 1999-2004 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
4439ba95daf7b82794fe338726790e2dab89d119wrowe<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>
4439ba95daf7b82794fe338726790e2dab89d119wrowe</body></html>