index.html.en revision 42af92a661a06b3cebc88d585aad75064a309d51
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<?xml version="1.0" encoding="ISO-8859-1"?>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd This file is generated from xml source: DO NOT EDIT
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd -->
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<title>Apache Virtual Host documentation - Apache HTTP Server</title>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<body id="manual-page"><div id="page-header">
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<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>
27e52281f1522522b170cafc76b08b58aa70ccaand<p class="apache">Apache HTTP Server Version 2.1</p>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<img alt="" src="/images/feather.gif" /></div>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<div id="path">
4b5981e276e93df97c34e4da05ca5cf8bbd937dand<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>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<div class="toplang">
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<a href="/en/vhosts/" title="English">&nbsp;en&nbsp;</a> |
ecc5150d35c0dc5ee5119c2717e6660fa331abbftakashi<a href="/ja/vhosts/" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
bc9d4698fce0238d2f6f2682e99423ebb1149976rbowen<a href="/ko/vhosts/" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd</div>
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end
ecc5150d35c0dc5ee5119c2717e6660fa331abbftakashi
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <p>The term <cite>Virtual Host</cite> refers to the practice of
b03f9485e6dfcf9326e6122f91eaa1ced8939818jim running more than one web site (such as
b03f9485e6dfcf9326e6122f91eaa1ced8939818jim <code>www.company1.com</code> and <code>www.company2.com</code>)
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd on a single machine. Virtual hosts can be "<a href="ip-based.html">IP-based</a>", meaning that you have a
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd different IP address for every web site, or "<a href="name-based.html">name-based</a>", meaning that you have
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd multiple names running on each IP address. The fact that they
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd are running on the same physical server is not apparent to the
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd end user.</p>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <p>Apache was one of the first servers to support IP-based
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd virtual hosts right out of the box. Versions 1.1 and later of
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd Apache support both IP-based and name-based virtual hosts
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd (vhosts). The latter variant of virtual hosts is sometimes also
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <p>Below is a list of documentation pages which explain all
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd details of virtual host support in Apache version 1.3 and
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd later.</p>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd</div>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#support">Virtual Host Support</a></li>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<li><img alt="" src="/images/down.gif" /> <a href="#directives">Configuration directives</a></li>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd</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
0853e1e2522c1ac17f697221758bcbd4781a7ff9ndhosts</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>
80eed96ee3d8cfa0b66d9fb1cfe63fd83254d38bnilgun<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80eed96ee3d8cfa0b66d9fb1cfe63fd83254d38bnilgun<div class="section">
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<h2><a name="support" id="support">Virtual Host Support</a></h2>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd
316f02e3836836c82e19019ff23f90a7ebc65289nilgun <ul>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <li><a href="name-based.html">Name-based Virtual Hosts</a> (More
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd than one web site per IP address)</li>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd address for each web site)</li>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <li><a href="examples.html">Virtual Host examples for common
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd setups</a></li>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <li><a href="fd-limits.html">File Descriptor Limits</a> (or,
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd <em>Too many log files</em>)</li>
08cf4a15275e4cb65a424b3a1db5410bfb51085cjim <li><a href="mass.html">Dynamically Configured Mass Virtual
22d5d84393d960a2027f472036f3fee15d7dbce9nd Hosting</a></li>
22d5d84393d960a2027f472036f3fee15d7dbce9nd <li><a href="details.html">In-Depth Discussion of Virtual Host
22d5d84393d960a2027f472036f3fee15d7dbce9nd Matching</a></li>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd </ul>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd
a78048ccbdb6256da15e6b0e7e95355e480c2301nd</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
50c04f297d76a57ead2fa6b73845f7563b1fc788sf<div class="section">
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<h2><a name="directives" id="directives">Configuration directives</a></h2>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <ul>
623eebe956d9c2d6d073ed3eae855b56030b40e9noodl <li><code class="directive"><a href="/mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <li><code class="directive"><a href="/mod/core.html#namevirtualhost">NameVirtualHost</a></code></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <li><code class="directive"><a href="/mod/core.html#servername">ServerName</a></code></li>
ffb88a4885747797937e30a5ac8b1606da3cb4adnd <li><code class="directive"><a href="/mod/core.html#serveralias">ServerAlias</a></code></li>
909ce17e2bd0faef7b1c294f2307f009793fd493nd <li><code class="directive"><a href="/mod/core.html#serverpath">ServerPath</a></code></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd </ul>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd
cd34a6fbf0a2619544a72eadb73f309370bf6682wrowe <p>If you are trying to debug your virtual host configuration, you
cd34a6fbf0a2619544a72eadb73f309370bf6682wrowe may find the Apache <code>-S</code> command line switch
42af92a661a06b3cebc88d585aad75064a309d51nd useful. That is, type the following command:</p>
42af92a661a06b3cebc88d585aad75064a309d51nd
ffb88a4885747797937e30a5ac8b1606da3cb4adnd <div class="example"><p><code>
6fe26506780e73be2a412d758af77fafdf03291and /usr/local/apache2/bin/httpd -S
a78048ccbdb6256da15e6b0e7e95355e480c2301nd </code></p></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd
9649d29bb7801e0698e6a845e1a8a61534df58b3noodl <p>This command will dump out a description of how Apache parsed
9649d29bb7801e0698e6a845e1a8a61534df58b3noodl the configuration file. Careful examination of the IP addresses and
a78048ccbdb6256da15e6b0e7e95355e480c2301nd server names may help uncover configuration mistakes. (See <a href="/programs/httpd.html">the docs for the httpd program</a> for
a78048ccbdb6256da15e6b0e7e95355e480c2301nd other command line options)</p>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd</div></div>
08cf4a15275e4cb65a424b3a1db5410bfb51085cjim<div class="bottomlang">
6aadbc6fd703e73d1d419e9f06b84a4338c898f1maczniak<p><span>Available Languages: </span><a href="/de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin<a href="/en/vhosts/" title="English">&nbsp;en&nbsp;</a> |
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<a href="/ja/vhosts/" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd<a href="/ko/vhosts/" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd</div><div id="footer">
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd<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>
0853e1e2522c1ac17f697221758bcbd4781a7ff9nd<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>
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd</body></html>