a couple questions about virtual hosts in Apache

Tim ignored_mailbox at yahoo.com.au
Sat Aug 11 07:14:15 UTC 2007


Scott:
> Another question.  So is this where I would for example put 
> bugzilla.pilotalk.com or is this only where any thing relating to 
> www.pilotalk.com goes?
> 
> ServerAlias alternatives that will be accepted, even if you rewrite them
> (as your rewrite rule did below).

If a particular virtual server was responding for both
bugzilla.pilotalk.com AND www.pilotalk.com, then one of the alternatives
goes into its aliases, and you don't configure other virtual servers for
the other domain names.

e.g. <VirtualHost *:80>
       ServerName  www.pilotalk.com
       ServerAlias  pilotalk.com  bugzilla.pilotalk.com
       ...[rest snipped for brevity]...
     </VirtualHost>

Alternatively, if you were having different virtual servers responding
to those different domain names, then you'd have completely independent
virtual server configuration sections.

e.g. <VirtualHost *:80>
       ServerName  www.pilotalk.com
       ServerAlias  pilotalk.com
       ...[rest snipped for brevity]...
     </VirtualHost>

     <VirtualHost *:80>
       ServerName  bugzilla.pilotalk.com
       ...[snipped for brevity]...
     </VirtualHost>

Think of the virtual hosts has being completely different computers
running independent web servers.  That's the intention.

-- 
[tim at bigblack ~]$ uname -ipr
2.6.22.1-41.fc7 i686 i386

Using FC 4, 5, 6 & 7, plus CentOS 5.  Today, it's FC7.

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.






More information about the users mailing list