On 11/2/05, Adam Roberts <[EMAIL PROTECTED]> wrote:
> It has been a longtime since I have needed to use <VirtualHost>'s and now my
> ignorance has caught up with me.
>
> I have a two domain names (domain1.com and domain2.net) that I am trying to
> host on the same machine with VirtualHost, however, I'm not having much
> luck.
>
> Background:
> Apache2 running on RHEL 3 ES Update 6.
>
> VirtualHost snippet from /etc/httpd/conf/httpd.conf
> ----------------------------------------------------------
>
> NameVirtualHost <ip-address>:80
>
> <VirtualHost <ip-address>>
>         ServerName www.domain2.net
>         ServerAdmin [EMAIL PROTECTED]
>         DocumentRoot /var/www/html/domain2
>         ServerAlias www.domain2.net domain2.net
> </VirtualHost>

If you do NameVirtualHost <ip-address>:80, you need to do <VirtualHost
<ip-address>:80>.  Also, though probably not the problem, there's no
need to put ServerAlias  www.domain2.net when you've already named it
as the ServerName.

Finally, make sure to restart Apache after you've made those changes
before you try again.

Sean

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to