blob: 479635cb81d5b8a81ee27e9154ccecd711affbb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<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.3</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="../"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache Virtual Host documentation</h1>
<div class="toplang">
<p><span>Available Languages: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="../en/vhosts/" title="English"> en </a> |
<a href="../fr/vhosts/" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
<a href="../ja/vhosts/" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/vhosts/" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
<a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
</div>
<p>The term <cite>Virtual Host</cite> refers to the practice of
running more than one web site (such as
<code>www.company1.com</code> and <code>www.company2.com</code>)
on a single machine. Virtual hosts can be "<a href="ip-based.html">IP-based</a>", meaning that you have a
different IP address for every web site, or "<a href="name-based.html">name-based</a>", meaning that you have
multiple names running on each IP address. The fact that they
are running on the same physical server is not apparent to the
end user.</p>
<p>Apache was one of the first servers to support IP-based
virtual hosts right out of the box. Versions 1.1 and later of
Apache support both IP-based and name-based virtual hosts
(vhosts). The latter variant of virtual hosts is sometimes also
called <em>host-based</em> or <em>non-IP virtual hosts</em>.</p>
<p>Below is a list of documentation pages which explain all
details of virtual host support in Apache version 1.3 and
later.</p>
</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><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
hosts</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>
<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>
<ul>
<li><a href="name-based.html">Name-based Virtual Hosts</a> (More
than one web site per IP address)</li>
<li><a href="ip-based.html">IP-based Virtual Hosts</a> (An IP
address for each web site)</li>
<li><a href="examples.html">Virtual Host examples for common
setups</a></li>
<li><a href="fd-limits.html">File Descriptor Limits</a> (or,
<em>Too many log files</em>)</li>
<li><a href="mass.html">Dynamically Configured Mass Virtual
Hosting</a></li>
<li><a href="details.html">In-Depth Discussion of Virtual Host
Matching</a></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="directives" id="directives">Configuration directives</a></h2>
<ul>
<li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li>
<li><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code></li>
<li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li>
<li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li>
<li><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code></li>
</ul>
<p>If you are trying to debug your virtual host configuration, you
may find the Apache <code>-S</code> command line switch
useful. That is, type the following command:</p>
<div class="example"><p><code>
/usr/local/apache2/bin/httpd -S
</code></p></div>
<p>This command will dump out a description of how Apache parsed
the configuration file. Careful examination of the IP addresses and
server names may help uncover configuration mistakes. (See
the docs for the <code class="program"><a href="../programs/httpd.html">httpd</a></code> program for
other command line options)</p>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="../en/vhosts/" title="English"> en </a> |
<a href="../fr/vhosts/" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
<a href="../ja/vhosts/" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/vhosts/" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
<a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
</div><div id="footer">
<p class="apache">Copyright 2010 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>
<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>
|