httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@hyperreal.org
Subject cvs commit: apache-1.3/htdocs/manual/vhosts name-based.html
Date Fri, 18 Dec 1998 23:49:45 GMT
lars        98/12/18 15:49:45

  Modified:    htdocs/manual/vhosts name-based.html
  Log:
  Some updates/modifications (based on the patch from the PR).
  
  PR: 3549
  Submitted by: Joshua Slive <slive+apachebugs@finance.commerce.ubc.ca>
  
  Revision  Changes    Path
  1.9       +30 -15    apache-1.3/htdocs/manual/vhosts/name-based.html
  
  Index: name-based.html
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/vhosts/name-based.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- name-based.html	1998/09/17 12:33:12	1.8
  +++ name-based.html	1998/12/18 23:49:44	1.9
  @@ -40,34 +40,49 @@
   <H2>Using non-IP Virtual Hosts</H2>
   
   <P>Using the new virtual hosts is quite easy, and superficially looks
  -like the old method. You simply add to one of the Apache configuration
  -files (most likely <CODE>httpd.conf</CODE> or <CODE>srm.conf</CODE>)
  -code similar to the following:</P>
  +like the old method. The notable difference between IP-based and
  +name-based virtual host configuration is the
  +<A HREF="../mod/core.html#namevirtualhost"><CODE>NameVirtualHost</CODE></A>
  +directive which specifies an IP address that should be used as a
  +target for name-based virtual hosts.</P>
  +
  +<P>For example, suppose that both <SAMP>www.domain.tld</SAMP> and
  +<SAMP>www.otherdomain.tld</SAMP> point at the IP address
  +<SAMP>111.22.33.44</SAMP>.  Then you simply add to one of the Apache
  +configuration files (most likely <CODE>httpd.conf</CODE> or
  +<CODE>srm.conf</CODE>) code similar to the following:</P>
  +
  +
  +
   <PRE>
       NameVirtualHost 111.22.33.44
   
       &lt;VirtualHost 111.22.33.44&gt;
       ServerName www.domain.tld
  -    DocumentRoot /web/domain
  +    DocumentRoot /www/domain
       &lt;/VirtualHost&gt;
  -</PRE>
   
  -<P>The notable difference between IP-based and name-based virtual host
  -configuration is the
  -<A HREF="../mod/core.html#namevirtualhost"><CODE>NameVirtualHost</CODE></A>
  -directive which specifies an IP address that should be used as a target for
  -name-based virtual hosts.
  +    &lt;VirtualHost 111.22.33.44&gt;
  +    ServerName www.otherdomain.tld
  +    DocumentRoot /www/otherdomain
  +    &lt;/VirtualHost&gt;
  +</PRE>
   
   <P>Of course, any additional directives can (and should) be placed
   into the <CODE>&lt;VirtualHost&gt;</CODE> section. To make this work,
  -all that is needed is to make sure that the name
  -<SAMP>www.domain.tld</SAMP> points to the IP address
  -<SAMP>111.22.33.44</SAMP></P>
  +all that is needed is to make sure that the names
  +<SAMP>www.domain.tld</SAMP> and <SAMP>www.otherdomain.tld</SAMP>
  +are pointing to the IP address <SAMP>111.22.33.44</SAMP></P>
   
   <P>Note: When you specify an IP address in a <CODE>NameVirtualHost</CODE>
   directive then requests to that IP address will only ever be served
  -by matching &lt;VirtualHost&gt;s.  The "main server" will <STRONG>never</STRONG>
  -be served from the specified IP address.
  +by matching &lt;VirtualHost&gt;s.  The "main server" will
  +<STRONG>never</STRONG> be served from the specified IP address.
  +If you start to use virtual hosts you should stop to use the "main server"
  +as an independent server and rather use it as a place for
  +configuration directives that are common for all your virtual hosts.
  +In other words, you should add a &lt;VirtualHost&gt; section for
  +<EM>every</EM> server (hostname) you want to maintain on your server.
   
   <P>Additionally, many servers may wish to be accessible by more than
   one name. For example, the example server might want to be accessible
  
  
  

Mime
View raw message