Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Sep 2001 16:50:19 -0400 (EDT)
From:      Joe Clarke <marcus@marcuscom.com>
To:        Andy Myers <andy@acmyers.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Apache question
Message-ID:  <20010903164718.L86981-100000@shumai.marcuscom.com>
In-Reply-To: <003101c134b4$d5053350$15fea8c0@heineken>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm not an Apache expert, but this is how I have one of my machines
configured for NameVirtualHost'ing:

NameVirtualHost 172.18.123.33

<VirtualHost _default_:*>
        DocumentRoot /usr/local/share/apache/htdocs
</VirtualHost>
<VirtualHost 172.18.123.33>
        DocumentRoot /usr/local/share/apache/htdocs/rtrack
        ServerName rtrack.cisco.com
        ServerAlias rtrack
        ErrorLog /var/log/rtrack_error.log
        CustomLog /var/log/rtrack_access.log combined
        DirectoryIndex index.php
</VirtualHost>
<VirtualHost 172.18.123.33>
        DocumentRoot /usr/local/share/apache/htdocs
        ServerName nms-server2.cisco.com
        ServerAlias nms-server2
</VirtualHost>


I think if you're going to do NameVirtualHost *, you need to specify
<VirtualHost *>.  You can also run httpd -S to verify your virutal host
config.

Joe

On Mon, 3 Sep 2001, Andy Myers wrote:

> Hello all.
>
> This is an Apache question, but I'm hoping someone here can answer it.
>
> I want my freebsd box to host another web site with a different domain name.
> I set up virtual hosting in httpd.conf as instuction in the apache docs, but
> when I try to bring up www.domain2.com in my browser, it always brings up
> www.domain1.com.
>
> www.domain1.com is the main site hosted by apache.  The virtual host portion
> of my httpd.conf file is:
>
> NameVirtualHost *
>
> <VirtualHost www.domain2.com>
>         ServerAdmin sysadmin@domain2.com
>         DocumentRoot /usr/local/www/domain2
>         ServerName www.domain2.com
> </VirtualHost>
>
>
> Any ideas?  I must be missing something!
>
> Thanks much.
>
> Andy Myers
> Orlando, Florida USA
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010903164718.L86981-100000>