apache virtual directories / VirtualHost overlap
zbigniew szalbot
zbigniew at szalbot.homedns.org
Wed Jan 9 08:11:43 PST 2008
Hello,
Schiz0 pisze:
> On Jan 9, 2008 11:00 AM, zbigniew szalbot <zbigniew at szalbot.homedns.org> wrote:
> > Hello,
> >
> > Can you help me solve what probably is a very simple problem with
> > virtual directories. I need to define two different virtual hosts for
> > the same IP.
> >
> > So I defined:
> >
> > NameVirtualHost 83.19.156.210
> >
> > <VirtualHost 83.19.156.210>
> > ServerAdmin webmaster at dummy-host.example.com
> > DocumentRoot /usr/local/www/data/
> > ServerName lists.lc-words.com
> > ErrorLog /var/log/httpd-error.log
> > CustomLog /var/log/httpd-access.log common
> > </VirtualHost>
> >
> > <VirtualHost 83.19.156.210>
> > ServerAdmin webmaster at dummy-host.example.com
> > DocumentRoot /usr/local/www/data/blog/
> > ServerName blog.lc-words.com
> > ErrorLog /var/log/httpd-error.log
> > CustomLog /var/log/httpd-access.log common
> > </VirtualHost>
> >
> > However, when I restart apache, I get:
> > [Wed Jan 09 16:59:34 2008] [warn] _default_ VirtualHost overlap on port
> > 80, the first has precedence
> >
> > What do I need to change to make it right?
> >
> > Many thanks!
> >
> > Zbigniew Szalbot
> > _______________________________________________
>
> Try adding the port to the IP addresses. For example:
>
> NameVirtualHost 83.19.156.210:80
> <VirtualHost 83.19.156.210:80>
> And also for the other VirtualHost block too.
>
I actually solved it by following advice from:
http://httpd.apache.org/docs/2.0/vhosts/name-based.html
However, the problem is that the blog.lc-words.com does not serve the
site I want it to serve. But instead serves the default site which is
lists.lc-words.com
Thanks!
ZS
More information about the freebsd-questions
mailing list