Re: [users@httpd] (again) Can not define "default" name virtual host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

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.

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


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.




>> If you want a VH to operate under the IP only, put it first.
> 
> Pardon? I want one virtual host under "195.168.3.66", one under
> "fantomas.fantomas.sk" and default virtual host into which requests for
> undefined/unconfigured requests will fall. My problem is described above
> (and cocumented below).
> 
> It seems that the name defined in <VirtualHost "name"> is also taken to one
> of aliases for virtual host, neither `httpd -S` does show it, nor the docs
> say so.
> 
> I would like to find out why, and how to get the documented behaviour.
> (Joshua said he will try to look at it, good)
> 
>>>> On 6/26/06, Matus UHLAR - fantomas <uhlar@xxxxxxxxxxx> wrote:
>>>>> this is my current configuration of apache (debian: 1.3.33-6sarge1):
>>>>>
>>>>> NameVirtualHost 195.168.3.66:80
>>>>>
>>>>> <VirtualHost 195.168.3.66:80>
>>>>> ServerName default.fantomas.sk
>>>>> DocumentRoot /home/webs/default.fantomas.sk
>>>>> </VirtualHost>
>>>>>
>>>>> <VirtualHost 195.168.3.66:80>
>>>>> ServerName fantomas.fantomas.sk
>>>>> DocumentRoot /home/webs/fantomas.fantomas.sk
>>>>> </VirtualHost>
>>>>>
>>>>> <VirtualHost 195.168.3.66:80>
>>>>> ServerName 195.168.3.66
>>>>> DocumentRoot /home/webs/195.168.3.66
>>>>> </VirtualHost>
>>>>>
>>>>> However, with this configuration I was not able to reach virtual host
>>>>> 195.168.3.66. It seems that apache accepts name defined in
>>>>> <VirtualHost [NAME]> as one of hames for name virtual host -
>>>>> when I switched to <VirtualHost fantomas.fantomas.sk>, I couldn't reach
>>>>> virtual host for fantomas.fantomas.sk.
> 
>>> LogFormat "%{%s}t %v %V %{Host}o %{Host}i %a %h %>s %b %T %u \"%U\" \"%{Referer}i\" \"%{User-Agent}i\"" testing
>>>
>>> 1151335141 default.fantomas.sk default.fantomas.sk - default.fantomas.sk 195.168.3.66 fantomas.fantomas.sk 200 20 4 - "/" "-" "-"
>>> 1151335149 default.fantomas.sk 195.168.3.66 - 195.168.3.66 195.168.3.66 fantomas.fantomas.sk 200 20 4 - "/" "-" "-"
>>> 1151335157 fantomas.fantomas.sk fantomas.fantomas.sk - fantomas.fantomas.sk 195.168.3.66 fantomas.fantomas.sk 200 21 5 - "/" "-" "-"
>>>
>>> so, with the above configuration, requesting of 195.168.3.66 maps to
>>> "default.fantomas.sk" virtual host...
> 

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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux