You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ke...@apache.org on 2002/10/04 17:09:47 UTC

cvs commit: httpd-2.0/docs/manual/vhosts fd-limits.html.en index.html.en name-based.html.en

kess        2002/10/04 08:09:47

  Modified:    docs/manual/vhosts fd-limits.html.en index.html.en
                        name-based.html.en
  Log:
  Conversion into XML
  
  Submitted by: Luiz Rocha <ls...@lsdr.net>
  
  Additionally changed:
  - changed <samp> to <code>
  - removed <pre> from emaples
  - restructured example.xml
  
  Revision  Changes    Path
  1.10      +30 -47    httpd-2.0/docs/manual/vhosts/fd-limits.html.en
  
  Index: fd-limits.html.en
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/vhosts/fd-limits.html.en,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- fd-limits.html.en	26 Jul 2002 07:32:22 -0000	1.9
  +++ fd-limits.html.en	4 Oct 2002 15:09:47 -0000	1.10
  @@ -1,19 +1,10 @@
  -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  -
  -<html xmlns="http://www.w3.org/1999/xhtml">
  -  <head>
  -    <meta name="generator" content="HTML Tidy, see www.w3.org" />
  -
  -    <title>Apache Server Virtual Host Support</title>
  -  </head>
  -  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  -
  -  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
  -  vlink="#000080" alink="#FF0000">
  -    <!--#include virtual="header.html" -->
  -
  -    <h1 align="center">File Descriptor Limits</h1>
  +<?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>File Descriptor Limits - 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.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div><div id="path"><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.0</a></div><div id="page-content"><div id="preamble"><h1>File Descriptor Limits</h1>
   
       <p>When using a large number of Virtual Hosts, Apache may run
       out of available file descriptors (sometimes called <cite>file
  @@ -32,46 +23,43 @@
         <li>Your system does not provide the <code>setrlimit()</code>
         system call.</li>
   
  -      <li>The <code>setrlimit(RLIMIT_NOFILE)</code> call does not 
  +      <li>The <code>setrlimit(RLIMIT_NOFILE)</code> call does not
         function on your system (such as Solaris 2.3)</li>
   
         <li>The number of file descriptors required exceeds the hard
         limit.</li>
  -
  +      
         <li>Your system imposes other limits on file descriptors,
         such as a limit on stdio streams only using file descriptors
         below 256. (Solaris 2)</li>
       </ol>
  -    In the event of problems you can: 
  +    In the event of problems you can:
   
       <ul>
         <li>Reduce the number of log files; don't specify log files
  -      in the <code><a 
  -      href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> 
  -      sections, but only log to the main log files. (See <a
  -      href="#splitlogs">Splitting up your log files</a>, below, for more
  +      in the <code class="directive"><a href="../mod/core.html#&lt;virtualhost&gt;">&lt;VirtualHost&gt;</a></code>
  +      sections, but only log to the main log files. (See <a href="#splitlogs">Splitting up your log files</a>, below, for more
         information on doing this.)</li>
   
         <li>
           If you system falls into 1 or 2 (above), then increase the
           file descriptor limit before starting Apache, using a
  -        script like 
  +        script like
   
  -        <blockquote>
  +        <div class="example"><p><code>
             <code>#!/bin/sh<br />
              ulimit -S -n 100<br />
              exec httpd</code>
  -        </blockquote>
  +        </code></p></div>
         </li>
       </ul>
   
  -    <p>Please see the <a
  -    href="../misc/descriptors.html">Descriptors and Apache</a>
  +    <p>Please see the <a href="../misc/descriptors.html">Descriptors and Apache</a>
       document containing further details about file descriptor
       problems and how they can be solved on your operating
       system.</p>
   
  -<h2><a name="splitlogs">Splitting up your log files</a></h2>
  +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="splitlogs" id="splitlogs">Splitting up your log files</a></h2>
   
   <p>If you want to log multiple virtual hosts to the same log file, you
   may want to split up the log files afterwards in order to run
  @@ -79,40 +67,35 @@
   accomplished in the following manner.</p>
   
   <p>First, you will need to add the virtual host information to the log
  -entries. This can be done using the <code><a
  -href="../mod/mod_log_config.html#logformat">LogFormat</a></code>
  +entries. This can be done using the <code class="directive"><a href="../mod/mod_log_config.html#&#10;logformat">
  +LogFormat</a></code>
   directive, and the <code>%v</code> variable. Add this to the beginning
   of your log format string:</p>
   
  -<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
  - LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
  - CustomLog logs/multiple_vhost_log vhost
  -</code></td></tr></table></blockquote>
  +<div class="example"><p><code>
  +LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
  +CustomLog logs/multiple_vhost_log vhost
  +</code></p></div>
   
   <p>This will create a log file in the common log format, but with the
   canonical virtual host (whatever appears in the
  -<a href="../mod/core.html#servername">ServerName</a> directive) prepended to
  -each line. (See <a 
  -href="../mod/mod_log_config.html#formats">Custom Log Formats</a> for
  +<code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> directive) prepended to
  +each line. (See <code class="directive"><a href="../mod/mod_log_config.html#custom log formats">Custom Log Formats</a></code> for
   more about customizing your log files.)</p>
   
   <p>When you wish to split your log file into its component parts (one
  -file per virtual host) you can use the program <code><a
  -href="../programs/other.html">split-logfile</a></code> to accomplish
  +file per virtual host) you can use the program <code><a href="../programs/other.html">split-logfile</a></code> to accomplish
   this. You'll find this program in the <code>support</code> directory
   of the Apache disribution.</p>
   
   <p>Run this program with the command:</p>
   
  -<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee">
  -<code>split-logfile &lt; /logs/multiple_vhost_log</code>
  -</td></tr></table></blockquote>
  +<div class="example"><p><code>
  +split-logfile &lt; /logs/multiple_vhost_log
  +</code></p></div>
   
   <p>This program, when run with the name of your vhost log file, will
   generate one file for each virtual host that appears in your log file.
   Each file will be called <code>hostname.log</code>.</p>
   
  -    <!--#include virtual="footer.html" -->
  -  </body>
  -</html>
  -
  +</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</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>
  \ No newline at end of file
  
  
  
  1.14      +27 -55    httpd-2.0/docs/manual/vhosts/index.html.en
  
  Index: index.html.en
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/vhosts/index.html.en,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- index.html.en	25 Jul 2002 21:46:42 -0000	1.13
  +++ index.html.en	4 Oct 2002 15:09:47 -0000	1.14
  @@ -1,27 +1,16 @@
  -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  -
  -<html xmlns="http://www.w3.org/1999/xhtml">
  -  <head>
  -    <meta name="generator" content="HTML Tidy, see www.w3.org" />
  -
  -    <title>Apache Virtual Host documentation</title>
  -  </head>
  -  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  -
  -  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
  -  vlink="#000080" alink="#FF0000">
  -    <!--#include virtual="header.html" -->
  -
  -    <h1 align="center">Apache Virtual Host documentation</h1>
  +<?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.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div><div id="path"><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.0</a></div><div id="page-content"><div id="preamble"><h1>Apache Virtual Host documentation</h1>
   
       <p>The term <cite>Virtual Host</cite> refers to the practice of
       running more than one web site (such as
  -    <samp>www.company1.com</samp> and <samp>www.company2.com</samp>)
  -    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
  +    <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>
   
  @@ -34,64 +23,47 @@
       <p>Below is a list of documentation pages which explain all
       details of virtual host support in Apache version 1.3 and
       later.</p>
  -    <hr />
   
  -    <h2>Virtual Host Support</h2>
  +</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></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> (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 
  +      <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 
  +      <li><a href="details.html">In-Depth Discussion of Virtual Host
         Matching</a></li>
       </ul>
   
  -    <h2>Configuration directives</h2>
  +</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><a
  -      href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></li>
  -
  -      <li><a
  -      href="../mod/core.html#namevirtualhost">NameVirtualHost</a></li>
  -
  -      <li><a href="../mod/core.html#servername">ServerName</a></li>
  -
  -      <li><a href="../mod/core.html#serveralias">ServerAlias</a></li>
  -
  -      <li><a href="../mod/core.html#serverpath">ServerPath</a></li>
  -
  -      <li><b>See also</b> <a 
  -      href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></li>
  +      <li><code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</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>-t -D DUMP_VHOSTS</code> command line switch 
  +    may find the Apache <code>-t -D DUMP_VHOSTS</code> command line switch
       useful. That is, type the following command:</p>
   
  -    <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
  +    <div class="example"><p><code>
       /usr/local/apache/bin/httpd -t -D DUMP_VHOSTS
  -    </code></td></tr></table></blockquote>
  -    
  +    </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 <a
  -    href="../programs/httpd.html">the docs for the httpd program</a> for
  +    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>
   
  -    <!--#include virtual="footer.html" -->
  -  </body>
  -</html>
  -
  +</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</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>
  \ No newline at end of file
  
  
  
  1.19      +158 -201  httpd-2.0/docs/manual/vhosts/name-based.html.en
  
  Index: name-based.html.en
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/vhosts/name-based.html.en,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- name-based.html.en	16 Aug 2002 18:21:48 -0000	1.18
  +++ name-based.html.en	4 Oct 2002 15:09:47 -0000	1.19
  @@ -1,124 +1,88 @@
  -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<?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>Name-based Virtual Host Support - 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.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div><div id="path"><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.0</a></div><div id="page-content"><div id="preamble"><h1>Name-based Virtual Host Support</h1>
  +
  +	<p>This document describes when and how to use name-based virtual hosts.</p>
  +
  +</div><div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">Name-based vs. IP-based Virtual Hosts</a></li><li><img alt="" src="../images/down.gif" /> <a href="#using">Using Name-based Virtual Hosts</a></li><li><img alt="" src="../images/down.gif" /> <a href="#">Compatibility with Older Browsers</a></li></ul><h3>See also</h3><ul class="seealso"><li><a href="ip-based.html">IP-based Virtual Host Support</a></li><li><a href="details.html">An In-Depth Discussion of Virtual Host Matching</a></li><li><a href="mass.html">Dynamically configured mass virtual hosting</a></li><li><a href="examples.html">Virtual Host examples for common setups</a></li><li><a href="examples.html#serverpath">ServerPath configuration example</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="namevip" id="namevip">Name-based vs. IP-based Virtual Hosts</a></h2>
  +
  +	<p>IP-based virtual hosts use the IP address of the connection to
  +	determine the correct virtual host to serve.  Therefore you need to
  +	have a separate IP address for each host.  With name-based virtual
  +	hosting, the server relies on the client to report the hostname as
  +	part of the HTTP headers.  Using this technique, many different hosts
  +	can share the same IP address.</p>
  +
  +	<p>Name-based virtual hosting is usually simpler, since you need
  +	only configure your DNS server to map each hostname to the correct
  +	IP address and then configure the Apache HTTP Server to recognize
  +	the different hostnames.  Name-based virtual hosting also eases
  +	the demand for scarce IP addresses.  Therefore you should use
  +	name-based virtual hosting unless there is a specific reason to
  +	choose IP-based virtual hosting.  Some reasons why you might consider
  +	using IP-based virtual hosting:</p>
  +
  +	<ul>
  +		<li>Some ancient clients are not compatible with name-based virtual
  +		hosting.  For name-based virtual hosting to work, the client must send
  +		the HTTP Host header.  This is required by HTTP/1.1, and is
  +		implemented by all modern HTTP/1.0 browsers as an extension.  If you
  +		need to support obsolete clients and still use name-based virtual
  +		hosting, a possible technique is discussed at the end of this
  +		document.</li>
  +
  +		<li>Name-based virtual hosting cannot be used with SSL secure servers
  +		because of the nature of the SSL protocol.</li>
  +
  +		<li>Some operating systems and network equipment implement bandwidth
  +		management techniques that cannot differentiate between hosts unless
  +		they are on separate IP addresses.</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="using" id="using">Using Name-based Virtual Hosts</a></h2>
  +
  +<table class="related"><tr><th>Related Modules</th><th>Related Directives</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</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#serveralias">ServerAlias</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#serverpath">ServerPath</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code></li></ul></td></tr></table>
  +
  +	<p>To use name-based virtual hosting, you must designate the IP
  +	address (and possibly port) on the server that will be accepting
  +	requests for the hosts.  This is configured using the <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> directive.
  +	In the normal case where any and all IP addresses on the server should
  +	be used, you can use <code>*</code> as the argument to
  +	<code>NameVirtualHost</code>.  Note that mentioning an IP address in a
  +	<code>NameVirtualHost</code> directive does not automatically make the
  +	server listen to that IP address.  See <a href="../bind.html">Setting
  +	which addresses and ports Apache uses</a> for more details.  In addition,
  +	any IP address specified here must be associated with a network interface
  +	on the server.</p>
  +
  +	<p>The next step is to create a <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> block for
  +	each different host that you would like to serve.  The argument to the
  +	<code>&lt;VirtualHost&gt;</code> directive should be the same as the
  +	argument to the <code>NameVirtualHost</code> directive (ie, an IP
  +	address, or <code>*</code> for all addresses).  Inside each
  +	<code>&lt;VirtualHost&gt;</code> block, you will need at minimum a /
  +	<code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> directive to
  +	designate which host is served and a <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> directive to
  +	show where in the filesystem the content for that host lives.</p>
  +
  +	<p>If you are adding virtual hosts to an existing web server, you
  +	must also create a &lt;VirtualHost&gt; block for the existing host.
  +	The <code>ServerName</code> and <code>DocumentRoot</code> included in
  +	this virtual host should be the same as the global
  +	<code>ServerName</code> and <code>DocumentRoot</code>.  List this
  +	virtual host first in the configuration file so that it will act as
  +	the default host.</p>
  +
  +	<p>For example, suppose that you are serving the domain
  +	<code>www.domain.tld</code> and you wish to add the virtual host
  +	<code>www.otherdomain.tld</code>, which points at the same IP address.
  +	Then you simply add the following to <code>httpd.conf</code>:</p>
   
  -<html xmlns="http://www.w3.org/1999/xhtml">
  -  <head>
  -    <title>Name-based Virtual Hosts</title>
  -  </head>
  -  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  -
  -  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
  -  vlink="#000080" alink="#FF0000">
  -    <!--#include virtual="header.html" -->
  -
  -    <h1 align="center">Name-based Virtual Host Support</h1>
  -
  -<p>This document describes when and how to use name-based virtual hosts.</p>
  -
  -<ul>
  -<li><a href="#namevip">Name-based vs. IP-based Virtual Hosts</a></li>
  -<li><a href="#using">Using Name-based Virtual Hosts</a></li>
  -<li><a href="#compat">Compatibility With Older Browsers</a></li>
  -</ul>
  -
  -<p>See also: <a href="examples.html">Virtual Host examples for common
  -setups</a>, <a href="ip-based.html">IP-based Virtual Host Support</a>,
  -<a href="details.html">An In-Depth Discussion of Virtual Host
  -Matching</a>, and <a href="mass.html">Dynamically configured mass
  -virtual hosting</a>.</p>
  -
  -<hr />
  -
  -<h2><a name="namevip">Name-based vs. IP-based Virtual Hosts</a></h2>
  -
  -<p>IP-based virtual hosts use the IP address of the connection to
  -determine the correct virtual host to serve.  Therefore you need to
  -have a separate IP address for each host.  With name-based virtual
  -hosting, the server relies on the client to report the hostname as
  -part of the HTTP headers.  Using this technique, many different hosts
  -can share the same IP address.</p>
  -
  -<p>Name-based virtual hosting is usually simpler, since you need
  -only configure your DNS server to map each hostname to the correct
  -IP address and then configure the Apache HTTP Server to recognize
  -the different hostnames.  Name-based virtual hosting also eases
  -the demand for scarce IP addresses.  Therefore you should use
  -name-based virtual hosting unless there is a specific reason to
  -choose IP-based virtual hosting.  Some reasons why you might consider
  -using IP-based virtual hosting:</p>
  -
  -<ul> 
  -
  -<li>Some ancient clients are not compatible with name-based virtual
  -hosting.  For name-based virtual hosting to work, the client must send
  -the HTTP Host header.  This is required by HTTP/1.1, and is
  -implemented by all modern HTTP/1.0 browsers as an extension.  If you
  -need to support obsolete clients and still use name-based virtual
  -hosting, a possible technique is discussed at the end of this
  -document.</li>
  -
  -<li>Name-based virtual hosting cannot be used with SSL secure servers
  -because of the nature of the SSL protocol.</li>
  -
  -<li>Some operating systems and network equipment implement bandwidth
  -management techniques that cannot differentiate between hosts unless
  -they are on separate IP addresses.</li>
  -
  -</ul>
  -
  -<h2><a name="using">Using Name-based Virtual Hosts</a></h2>
  -
  -<table border="1">
  -<tr><td valign="top">
  -<strong>Related Directives</strong><br /><br />
  -
  -<a href="../mod/core.html#documentroot">DocumentRoot</a><br />
  -<a href="../mod/core.html#namevirtualhost">NameVirtualHost</a><br />
  -<a href="../mod/core.html#serveralias">ServerAlias</a><br />
  -<a href="../mod/core.html#servername">ServerName</a><br />
  -<a href="../mod/core.html#serverpath">ServerPath</a><br />
  -<a href="../mod/core.html#virtualhost">VirtualHost</a><br />
  -</td></tr></table>
  -
  -<p>To use name-based virtual hosting, you must designate the IP
  -address (and possibly port) on the server that will be accepting
  -requests for the hosts.  This is configured using the <a
  -href="../mod/core.html#namevirtualhost">NameVirtualHost</a> directive.
  -In the normal case where any and all IP addresses on the server should
  -be used, you can use <code>*</code> as the argument to
  -<code>NameVirtualHost</code>.  Note that mentioning an IP address in a
  -<code>NameVirtualHost</code> directive does not automatically make the
  -server listen to that IP address.  See <a href="../bind.html">Setting
  -which addresses and ports Apache uses</a> for more details.  In addition,
  -any IP address specified here must be associated with a network interface
  -on the server.</p>
  -
  -<p>The next step is to create a <a
  -href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a> block for
  -each different host that you would like to serve.  The argument to the
  -<code>&lt;VirtualHost&gt;</code> directive should be the same as the
  -argument to the <code>NameVirtualHost</code> directive (ie, an IP
  -address, or <code>*</code> for all addresses).  Inside each
  -<code>&lt;VirtualHost&gt;</code> block, you will need at minimum a <a
  -href="../mod/core.html#servername">ServerName</a> directive to
  -designate which host is served and a <a
  -href="../mod/core.html#documentroot">DocumentRoot</a> directive to
  -show where in the filesystem the content for that host lives.</p>
  -
  -<p>If you are adding virtual hosts to an existing web server, you
  -must also create a &lt;VirtualHost&gt; block for the existing host.
  -The <code>ServerName</code> and <code>DocumentRoot</code> included in
  -this virtual host should be the same as the global
  -<code>ServerName</code> and <code>DocumentRoot</code>.  List this
  -virtual host first in the configuration file so that it will act as
  -the default host.</p>
  -
  -<p>For example, suppose that you are serving the domain
  -<samp>www.domain.tld</samp> and you wish to add the virtual host
  -<samp>www.otherdomain.tld</samp>, which points at the same IP address.
  -Then you simply add the following to <code>httpd.conf</code>:</p>
  -
  -<pre>
  +	<div class="example"><pre>
       NameVirtualHost *
   
       &lt;VirtualHost *&gt;
  @@ -130,110 +94,103 @@
       ServerName www.otherdomain.tld
       DocumentRoot /www/otherdomain
       &lt;/VirtualHost&gt;
  -</pre>
  +</pre></div>
   
  -<p>You can alternatively specify an explicit IP address in place of
  -the * in both the <code>NameVirtualHost</code> and
  -<code>&lt;VirtualHost&gt;</code> directives.</p>
  -
  -<p>Many servers want to be accessible by more than one name.  This is
  -possible with the <a
  -href="../mod/core.html#serveralias"><code>ServerAlias</code></a>
  -directive, placed inside the &lt;VirtualHost&gt; section. For
  -example if you add this to the first &lt;VirtualHost&gt; block
  -above</p> 
  -
  -<blockquote><code> 
  -ServerAlias domain.tld *.domain.tld
  -</code></blockquote>
  -
  -<p>then requests for all hosts in the <code>domain.tld</code> domain
  -will be served by the <code>www.domain.tld</code> virtual host.  The
  -wildcard characters * and ? can be used to match names.  Of course,
  -you can't just make up names and place them in <code>ServerName</code>
  -or <code>ServerAlias</code>.  You must first have your DNS server
  -properly configured to map those names to an IP address associated
  -with your server.</p>
  -
  -<p>Finally, you can fine-tune the configuration of the virtual hosts
  -by placing other directives inside the
  -<code>&lt;VirtualHost&gt;</code> containers.  Most directives can be
  -placed in these containers and will then change the configuration only
  -of the relevant virtual host.  To find out if a particular directive
  -is allowed, check the <a
  -href="../mod/directive-dist.html#Context">Context</a> of the
  -directive.  Configuration directives set in the <em>main server
  -context</em> (outside any <code>&lt;VirtualHost&gt;</code> container)
  -will be used only if they are not overriden by the virtual host
  -settings.</p>
  -
  -<p>Now when a request arrives, the server will first check if it is
  -using an IP address that matches the <code>NameVirtualHost</code>.  If
  -it is, then it will look at each <code>&lt;VirtualHost&gt;</code>
  -section with a matching IP address and try to find one where the
  -<code>ServerName</code> or <code>ServerAlias</code> matches the
  -requested hostname.  If it finds one, then it uses the configuration
  -for that server.  If no matching virtual host is found, then
  -<strong>the first listed virtual host</strong> that matches the IP
  -address will be used.</p>
  -
  -<p>As a consequence, the first listed virtual host is the
  -<em>default</em> virtual host.  The <code>DocumentRoot</code> from the
  -<em>main server</em> will <strong>never</strong> be used when an IP
  -address matches the <code>NameVirtualHost</code> directive.  If you
  -would like to have a special configuration for requests that do not
  -match any particular virtual host, simply put that configuration in a
  -<code>&lt;VirtualHost&gt;</code> container and list it first in the
  -configuration file.</p>
  +	<p>You can alternatively specify an explicit IP address in place of
  +	the * in both the <code>NameVirtualHost</code> and
  +	<code>&lt;VirtualHost&gt;</code> directives.</p>
  +
  +	<p>Many servers want to be accessible by more than one name.  This is
  +	possible with the <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>
  +	directive, placed inside the &lt;VirtualHost&gt; section. For
  +	example if you add this to the first &lt;VirtualHost&gt; block
  +	above</p>
  +
  +	<div class="example"><p><code>
  +	ServerAlias domain.tld *.domain.tld
  +	</code></p></div>
  +
  +	<p>then requests for all hosts in the <code>domain.tld</code> domain
  +	will be served by the <code>www.domain.tld</code> virtual host.  The
  +	wildcard characters * and ? can be used to match names.  Of course,
  +	you can't just make up names and place them in <code>ServerName</code>
  +	or <code>ServerAlias</code>.  You must first have your DNS server
  +	properly configured to map those names to an IP address associated
  +	with your server.</p>
  +
  +	<p>Finally, you can fine-tune the configuration of the virtual hosts
  +	by placing other directives inside the
  +	<code>&lt;VirtualHost&gt;</code> containers.  Most directives can be
  +	placed in these containers and will then change the configuration only
  +	of the relevant virtual host.  To find out if a particular directive
  +	is allowed, check the <a href="../mod/directive-dict.html#Context">Context</a> of the
  +	directive.  Configuration directives set in the <em>main server
  +	context</em> (outside any <code>&lt;VirtualHost&gt;</code> container)
  +	will be used only if they are not overriden by the virtual host
  +	settings.</p>
  +
  +	<p>Now when a request arrives, the server will first check if it is
  +	using an IP address that matches the <code>NameVirtualHost</code>.  If
  +	it is, then it will look at each <code>&lt;VirtualHost&gt;</code>
  +	section with a matching IP address and try to find one where the
  +	<code>ServerName</code> or <code>ServerAlias</code> matches the
  +	requested hostname.  If it finds one, then it uses the configuration
  +	for that server.  If no matching virtual host is found, then
  +	<strong>the first listed virtual host</strong> that matches the IP
  +	address will be used.</p>
  +
  +	<p>As a consequence, the first listed virtual host is the
  +	<em>default</em> virtual host.  The <code>DocumentRoot</code> from the
  +	<em>main server</em> will <strong>never</strong> be used when an IP
  +	address matches the <code>NameVirtualHost</code> directive.  If you
  +	would like to have a special configuration for requests that do not
  +	match any particular virtual host, simply put that configuration in a
  +	<code>&lt;VirtualHost&gt;</code> container and list it first in the
  +	configuration file.</p>
   
  -<h2><a name="compat">Compatibility with Older Browsers</a></h2>
  +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="" id="">Compatibility with Older Browsers</a></h2>
   
  -    <p>As mentioned earlier, there are some clients 
  +    <p>As mentioned earlier, there are some clients
       who do not send the required data for the name-based virtual
       hosts to work properly. These clients will always be sent the
       pages from the first virtual host listed for that IP address
       (the <cite>primary</cite> name-based virtual host).</p>
   
  -    <p>There is a possible workaround with the <a
  -    href="../mod/core.html#serverpath"><code>ServerPath</code></a>
  +    <p>There is a possible workaround with the <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code>
       directive, albeit a slightly cumbersome one:</p>
   
       <p>Example configuration:</p>
  -<pre>
  -    NameVirtualHost 111.22.33.44
   
  -    &lt;VirtualHost 111.22.33.44&gt;
  -    ServerName www.domain.tld
  -    ServerPath /domain
  -    DocumentRoot /web/domain
  -    &lt;/VirtualHost&gt;
  -</pre>
  +    <div class="example"><p><code>
  +    NameVirtualHost 111.22.33.44<br />
  +    <br />
  +    &lt;VirtualHost 111.22.33.44&gt;<br />
  +    ServerName www.domain.tld<br />
  +    ServerPath /domain<br />
  +    DocumentRoot /web/domain<br />
  +    &lt;/VirtualHost&gt;<br />
  + 	  </code></p></div>
   
       <p>What does this mean? It means that a request for any URI
  -    beginning with "<samp>/domain</samp>" will be served from the
  -    virtual host <samp>www.domain.tld</samp> This means that the
  +    beginning with "<code>/domain</code>" will be served from the
  +    virtual host <code>www.domain.tld</code> This means that the
       pages can be accessed as
       <code>http://www.domain.tld/domain/</code> for all clients,
  -    although clients sending a <samp>Host:</samp> header can also
  +    although clients sending a <code>Host:</code> header can also
       access it as <code>http://www.domain.tld/</code>.</p>
   
       <p>In order to make this work, put a link on your primary
       virtual host's page to
  -    <samp>http://www.domain.tld/domain/</samp> Then, in the virtual
  +    <code>http://www.domain.tld/domain/</code> Then, in the virtual
       host's pages, be sure to use either purely relative links
  -    (<em>e.g.</em>, "<samp>file.html</samp>" or
  -    "<samp>../icons/image.gif</samp>" or links containing the
  -    prefacing <samp>/domain/</samp> (<em>e.g.</em>,
  -    "<samp>http://www.domain.tld/domain/misc/file.html</samp>" or
  -    "<samp>/domain/misc/file.html</samp>").</p>
  +    (<em>e.g.</em>, "<code>file.html</code>" or
  +    "<code>../icons/image.gif</code>" or links containing the
  +    prefacing <code>/domain/</code> (<em>e.g.</em>,
  +    "<code>http://www.domain.tld/domain/misc/file.html</code>" or
  +    "<code>/domain/misc/file.html</code>").</p>
   
       <p>This requires a bit of discipline, but adherence to these
       guidelines will, for the most part, ensure that your pages will
       work with all browsers, new and old.</p>
   
  -    <p>See also: <a href="examples.html#serverpath">ServerPath
  -    configuration example</a></p>
  -    <!--#include virtual="footer.html" -->
  -  </body>
  -</html>
  -
  +</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</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>
  \ No newline at end of file