blob: 223aae4875f084b1b13f5a7c8c4a9857300e3d90 (
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
|
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<manualpage>
<relativepath href=".."/>
<title>Apache Virtual Host documentation</title>
<summary>
<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 a single IP address. The fact that they
are running on the same 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>
</summary>
<seealso>
<module>mod_vhost_alias</module>
</seealso>
<section id="support"><title>Virtual Host Support</title>
<ul>
<li><a href="name-based.html">Name-based Virtual Hosts</a> (One IP
address, multiple web sites)</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>
</section>
<section id="directives"><title>Configuration directives</title>
<ul>
<li><directive type="section"
module="core">VirtualHost</directive></li>
<li><directive module="core">NameVirtualHost</directive></li>
<li><directive module="core">ServerName</directive></li>
<li><directive module="core">ServerAlias</directive></li>
<li><directive module="core">ServerPath</directive></li>
</ul>
<p>If you are trying to debug your virtual host configuration, you
may find the Apache <code>-t -D DUMP_VHOSTS</code> command line switch
useful. That is, type the following command:</p>
<example>
/usr/local/apache/bin/httpd -t -D DUMP_VHOSTS
</example>
<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 <a
href="../programs/httpd.html">the docs for the httpd program</a> for
other command line options)</p>
</section>
</manualpage>
|