httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <uh...@fantomas.sk>
Subject Re: [users@httpd] (again) Can not define "default" name virtual host
Date Tue, 27 Jun 2006 08:48:47 GMT
On 27.06.06 09:34, Pid wrote:
> Matus UHLAR - fantomas wrote:
> > On 26.06.06 16:45, Pid wrote:
> >> It maps there because it's the first in the list.
> > 
> > Pardon? My problem is that request for "195.168.3.66" goes to
> > "default.fantomas.sk" although "195.168.3.66" has its own virtual host.
> 
> Yes, I was quite clear on that and I think that I've offered a solution.
> 
> I think that the server is not resolving the IP to the ServerName you
> specify, because you are specifying the IP in the VirtualHost directive.

afaik the server does not resolve IP's to hosts here (do you have other
informations?)

> Instead, because it can't match VirtualHost it's selecting the default
> VirtualHost, which is always the first one defined in the list of
> VirtualHosts.

requests for "195.168.3.66" should go to virtualhost "195.168.3.66" if they
come to the same address the virtual host is defined at, afaik no DNS
resolution applies here.

The only place where DNS resolution applies, is where I define:

<VirtualHost fantomas.fantomas.sk:80>     <--- here
ServerName 195.168.3.66
DocumentRoot /home/webs/195.168.3.66
</VirtualHost>

in which case I can't have virtual host for "fantomas.fantomas.sk" because
it would fall into this one :-(

> Ergo, your solution is to move the VirtualHost with 'ServerName
> 195.168.3.66' to the first position in the list of VirtualHosts.

That would mean that requests for "195.168.3.66" would go to the default
virtual host which is also what I do not want.

> Alternatively, if you specify NameVirtualHost *:80 and use VirtualHost
> *:80 the 'ServerName 195.168.3.66' should properly select the correct
> host.  If you are operating different IPs tell this instance of Apache
> to only Listen to this IP.

and run different apache instances on different IPs? Yes, both would be a
workaround, but I would prefer a solution.

I looked at the code to find out what's wrong, but I am not a programmer
(although I can code in C, it's not my work so I have nearly no practice).

I would patch apache myself if I found the solution... this makes me a

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows.   -- Matthew D. Fuller

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message