Add a section on Virtual Hosting with Apache.

PR:		docs/69478
Submitted by:	Brad Davis <so14k@so14k.com>
(also seems to be from Apache's httpd.conf comments)
This commit is contained in:
Murray Stokely 2004-08-02 05:14:10 +00:00
parent 4944385516
commit 1e50c6d185
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=21761

View file

@ -4127,8 +4127,6 @@ zone "10.168.192.in-addr.arpa" in {
Performance tuning directives.
Virtual Hosts
Log file format -->
</sect2>
@ -4181,6 +4179,47 @@ Log file format -->
</sect2>
<sect2>
<title>Virtual Hosting</title>
<para><application>Apache</application> supports two different
types of Virtual Hosting. The first method is Name-based
Virtual Hosting. Name-based virtual hosting uses the clients
HTTP/1.1 headers to figure out the hostname. This allows many
different domains to share the same IP address.</para>
<para>To setup <application>Apache</application> to use
Name-based Virtual Hosting add an entry like the following to
your <filename>httpd.conf</filename>.</para>
<programlisting>NameVirtualHost *</programlisting>
<para>If your webserver was named <hostid>www.domain.tld</hostid> and
you wanted to setup a virtual domain for
<hostid>www.someotherdomain.tld</hostid> then you would add
the following entries to
<filename>httpd.conf</filename>:</para>
<screen>&lt;VirtualHost *&gt;
ServerName www.domain.tld
DocumentRoot /www/domain.tld
&lt;VirtualHost&gt;
&lt;VirtualHost *&gt;
ServerName www.someotherdomain.tld
DocumentRoot /www/someotherdomain.tld
&lt;/VirtualHost&gt;</screen>
<para>Replace the addresses with the addresses you want to use
and the path to the documents with what you are using.</para>
<para>For more information about setting up virtual hosts,
please consult the official <application>Apache</application>
documentation at: <ulink
url="http://httpd.apache.org/docs/vhosts/"></ulink></para>
</sect2>
<sect2>
<title>Apache Modules</title>