Bug 69478

Summary: Add bit about Apache VirtualHosts
Product: Documentation Reporter: Brad Davis <so14k>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Brad Davis 2004-07-23 12:50:26 UTC
	Add bit about VirtualHosts to the Apache section

Fix: 

<sect2>
+      <title>Virtual Hosting</title>
+
+      <para>Apache 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 Apache to use Name-based Virtual Hosting add an entry like the following
+        to your <filename>httpd.conf</filename>.</para>
+
+      <programlisting>NameVirtualHost *</programlisting>
+
+      <para>If you had the domains www.domain.tld and www.someotherdomain.tld you would add
+        entries that look like the following:</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 info consult the official Apache documentation at:
+        <ulink url="http://httpd.apache.org/docs/vhosts/name-based.html"></ulink></para>
+
+    </sect2>
+
+    <sect2>
       <title>Apache Modules</title>

       <indexterm><primary>Apache</primary>--Jyfns6YOVfpTp4ecb69Jxnm79MTKXD88hGNVhNWMtl1oHe7G
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- doc-ori/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml Fri Jul 23 01:22:03 2004
+++ doc/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml     Fri Jul 23 05:40:43 2004
@@ -4161,6 +4161,40 @@
     </sect2>
Comment 1 Murray Stokely freebsd_committer freebsd_triage 2004-08-02 06:17:51 UTC
On Fri, Jul 23, 2004 at 05:43:49AM -0600, Brad Davis wrote:
> +
> +      <para>Apache 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>
> +


Please wrap the paragraph next time.  It makes it easier to review.


> +      <para>To setup Apache to use Name-based Virtual Hosting add an entry like the following

I added <application> tags around Apache in this section.

> +      <para>If you had the domains www.domain.tld and www.someotherdomain.tld you would add
> +        entries that look like the following:</para>

This seems to be taken from the example in httpd.conf, which is fine,
but please mention the sources when you submit things like this.  Also
these domains should be wrapped in <hostid> tags.  I reworded this
slightly.

> +      <para>For more info consult the official Apache documentation at:
> +        <ulink url="http://httpd.apache.org/docs/vhosts/name-based.html"></ulink></para>


We should use 'information' here and not informal half-words like
'info'.  Also I updated the URL to vhosts/ rather than just the
name-based.html file.  We also want to tell the user about the other
type of virtual hosting (ip based), that you mention in the
introduction of this section but then only explain name based.

With these chagnes, I have committed this to CVS.  Thanks!

     - Murray
Comment 2 Murray Stokely freebsd_committer freebsd_triage 2004-08-02 06:17:55 UTC
State Changed
From-To: open->closed

Committed, thanks.  It may take up to 24 hours for this to appear on 
the website.