home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] DSL, .11g router, apache, bind, port forwarding on a small network.

  • Subject: Re: [OCLUG-Tech] DSL, .11g router, apache, bind, port forwarding on a small network.
  • From: "Dan Langille" <dan [ at ] langille [ dot ] org>
  • Date: Sat, 08 Apr 2006 12:09:17 -0400
On 8 Apr 2006 at 10:36, sberaud wrote:

> Alas the way I wrote was the only way that allows both to work at all. 
> Both of the ways described below (as described in the docs as well) do 
> not work.
> 
> Michael's way results in the server complaining that there are no 
> virtual hosts on my subnet and with a hint "perhaps you should use 
> namevirtualhost" (which I was already), and Dan's way results in httpd 
> complaining there are no virtual hosts anywhere. Later documentations 
> also suggests using * here will result in the server stopping listening 
> to any port as it would end up trying to listen in on all of them, in 
> complete disagreement with the earlier section that suggested using it.
> 
> All very confusing and odd because I have set 9.1 up a couple times with 
> virtual hosts in the past and never had this issue.
> 
> Thanks for the input, I will have to keep trying.

Have you tried: NameVirtualHost *

 
> Scy
> 
> 
> 
> 
> 
> 
> 
> 
> Dan Langille wrote:
> > On 8 Apr 2006 at 8:38, Michael Thomas wrote:
> >
> >   
> >>  
> >>     
> >>> This is what I have in vhost.conf (the mandrake way is to include the 
> >>> section as a different file).
> >>>
> >>> <VirtualHost 192.168.10.2>
> >>> ServerName www.myservername.net
> >>> DocumentRoot /var/www/html
> >>> </VirtualHost>
> >>>
> >>> NameVirtualHost 192.168.10.2
> >>> <VirtualHost 192.168.10.2>
> >>> ServerName www.myvirtualhost.com
> >>> DocumentRoot /home/user/public_html
> >>> </VirtualHost>
> >>>
> >>> It is configured this way as it seems to be the only way it wants to 
> >>> work for both, at least locally. If I leave the main one out, the 
> >>> second overrides my main site. Then, if I use the NameVirtualHost 
> >>> directive prior to the first entry, httpd, when restarted, complains 
> >>> that one will override the other, and only the first is to be used. 
> >>>       
> >>  
> >>
> >>  It should be as follows. You only need one NameVirtualHost per ip 
> >> address/port pairing. Here port 80 is implied.
> >>
> >> NameVirtualHost 192.168.10.2
> >>
> >> <VirtualHost 192.168.10.2>
> >> ServerName www.myvirtualhost.com
> >> DocumentRoot /home/user/public_html
> >> </VirtualHost>
> >>
> >> <VirtualHost 192.168.10.2>
> >> ServerName www.myservername.net
> >> DocumentRoot /var/www/html
> >> </VirtualHost>
> >>     
> >
> > As well, if you have just one IP, you can use this instead:
> >
> > <VirtualHost *>
> >
> >
> >
> >   
> _______________________________________________
> Linux mailing list
> Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
> http://www.oclug.on.ca/mailman/listinfo/linux
> 



-- 
Dan Langille : Software Developer looking for work
my resume: http://www.freebsddiary.org/dan_langille.php