a couple questions about virtual hosts in Apache

Tim ignored_mailbox at yahoo.com.au
Wed Aug 8 20:09:19 UTC 2007


On Wed, 2007-08-08 at 13:17 -0500, Scott wrote:
> I am needing to set up a virtual host for Pilotalk.com because I have
> more than one server I need to run on the Linux machine.  I am having
> a problem where my web site does not come up and I am pretty certain
> that my NameVirtualHost and virtualHosts blocks are correct.  Here is
> what they look like:
>  
> <VirtualHost *:80>
> ServerAdmin webmaster at pilotalk.com
> DocumentRoot /var/www/html
> ServerName pilotalk.com
> ServerAlias pilotalk.com *.pilotalk.com
> ErrorLog logs/PilotalkBraillesoft.com-error_log
> CustomLog logs/PilotalkBraillesoft.com-access_log common
> </VirtualHost>
>  
> <VirtualHost *:80>
> ServerName www.pilotalk.com
> DocumentRoot /var/www/html/PilotalkBraillesoft.com
> DirectoryIndex index.php
> </VirtualHost>

They look essentially correct, though the top one has a wildcard for
pilotalk.com the next one has another pilotalk.com domain, I think you
might be confusing things.  Why did you put the wildcard in there?  What
are you hoping to match?

Do you have a NameVirtualHost directive before them, somewhere?

e.g. NameVirtualHost *:80

When playing with virtual hosts, you may have to change some of the main
configuration, too.  I had to do so with an older version of Apache, I
haven't tried configuring virtual hosts on a newer one since FC4.
Though that may have been just down to needing to do something special,
for my own sake.  I can't really recall, now.  It all depends on how you
want your defaults handled - when someone connects to your IP without
the request including a hostname, what site should they get?

What do you mean by "does not come up"?  The server doesn't start, you
don't get the pages you expect when you browse to it, something else?

-- 
(This box runs FC5, my others run FC4 & FC6, in case that's
 important to the thread.)

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