Penguin
Diff: NameVirtualHosting
EditPageHistoryDiffInfoLikePages

Differences between current version and previous revision of NameVirtualHosting.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 5 Last edited on Sunday, February 25, 2007 12:07:34 pm by TimCareySmith
Older page: version 4 Last edited on Saturday, February 24, 2007 4:02:59 pm by TimCareySmith Revert
@@ -60,4 +60,15 @@
  
 With this configuration, any and every request for a page on one of the alias domains, eg. <tt>~http://example.com/products/</tt>, will redirect the visitor the same page in the canonical domain, in this case <tt>~http://www.example.co.nz/products/</tt>. 
  
 There are other ways to achieve this, such as using mod_rewrite, but none of them is as simple as this one. 
+  
+The advantage with using the <tt>aliases.for.www.example.co.nz</tt> as the <tt>~ServerName</tt> in the second <tt>~VirtualHost</tt> is that when using the command <tt>apache2ctl -S</tt> you get the following output:  
+  
+<verbatim>  
+ port 80 namevhost www.example.co.nz  
+ (/etc/apache2/sites-enabled/ubersite.conf:3)  
+ port 80 namevhost aliases.for.www.example.co.nz  
+ (/etc/apache2/sites-enabled/ubersite.conf:11)  
+</verbatim>  
+  
+This allows you to easily identify the alias <tt>~VirtualHost</tt>s.