At 06:41 AM 8/15/2003 -0000, Roland Cruse wrote: >This is a multi-part message in MIME format... > >------------=_1060908933-23073-111 > >On Thu, Aug 14, 2003 at 02:38:39PM -0400, Haywiremac wrote: >> >> and I know it does have an effect, as whatever document root is >> specified first is served, but never the second. >> >> here is my Vhosts.conf >> >> ################# Named VirtualHosts >> NameVirtualHost * >> <VirtualHost *> >> ServerName www.orderinchaos.org >> DocumentRoot /var/www/html >> </VirtualHost> > >Instead of a star in the <VirtualHost *> directive put each >of your domain names (what ZoneEdit has pointing at you). > ><VirtualHost www.orderinchaos.org> > >and see if that does it. > >I use apache on my local host and got mixed results using the * Depending on how many subdomains you have for a given domain, here's a quick rundown on what you can put in place.
Say you own the domain, "example.com", and you have the following names: www.example.com ftp.example.com mail.example.com dev.example.com news.example.com test.example.com and you want the following: ftp.example.com to point to /home/web/ftp dev.example.com and test.example.com to /home/web/test www.example.com and all others to point to /home/web/www You can do it for each of the domain names for a total of 6 entries, or you can do something like: <VirtualHost ftp.example.com> Servername ftp.example.com DocumentRoot /home/web/ftp </VirtualHost> <VirtualHost dev.example.com test.example.com> Servername dev.example.com DocumentRoot /home/web/test </VirtualHost> <VirtualHost *.example.com> ServerName www.example.com DocumentRoot /home/web/www </VirtualHost> Keep in mind that the order for the above is important (most importantly for the *.example.com entry. Here's why: If you put the *.example.com entry before any of the other "VirtualHost" directives, when something comes in for dev.example.com, apache uses whatever the first match is. In the example above, it would correctly pull it from /home/web/test . On the other hand if *.example.com is before the entry (either first or second on the list), it would match that entry and incorrectly use the page from /home/web/www, instead of the correct /home/web/test -- essentially ignoring any further entries. Hope this gives everyone (especially those wanting to set up virtualhosts) something useful to work with, Michael -- Michael Viron Core Systems Group Simple End User Linux > >Roland > > >------------=_1060908933-23073-111 >Content-Type: text/plain; name="message.footer" >Content-Disposition: inline; filename="message.footer" >Content-Transfer-Encoding: 8bit > >Want to buy your Pack or Services from MandrakeSoft? >Go to http://www.mandrakestore.com > >------------=_1060908933-23073-111-- >
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com