tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Wild" <jw...@DLBlair.com>
Subject FW: Virtual Host Alias ignored?
Date Thu, 30 Aug 2012 12:12:10 GMT
-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] 
Sent: Wednesday, August 29, 2012 4:18 PM
To: Tomcat Users List
Subject: Re: Virtual Host Alias ignored?

2012/8/30 Jeff Wild <jwild@dlblair.com>:
> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Wednesday, August 29, 2012 11:49 AM
> To: Tomcat Users List
> Subject: Re: Virtual Host Alias ignored?
>
> 2012/8/29 Jeff Wild <jwild@dlblair.com>:
>> Tomcat 6 (standalone), several virtual hosts
>>
>>
>>
>> I have a A record for mydomain.com and a CNAME record for
>> www.mydomain.com.
>>
>> When I enter domain.com in my browser, everything works fine but
>> www.domain.com results in "Server not found."
>>
>>
>>
>> 1. Is my configuration correct when no https is required?
>>
>> 2. Is it possible there's a DNS issue?
>>
>>
>>
>>         <Connector
>>
>>             address="192.168.100.98"
>>
>>             port="80"
>>
>>             protocol="HTTP/1.1"
>>
>>             connectionTimeout="20000"
>>
>>             useIPVHosts="true" />
>>
>
> <Alias> is just a textual string that is matched against data sent by
> incoming HTTP request.  No DNS lookup happens at Tomcat side.
>
> Your useIPVHosts="true"  effectively disables host name matching.
> (Target IP address of incoming request will be used instead of the
> value of the "Host" header).
>
>
> Granted, so if my DNS is set up correctly (www.mydomain.com CNAME
points
> to mydomain.com) then requests to www.mydomain.com should appear to
> tomcat as coming from the same IP as mydomain.com.  So why isn't this
> working?

1. I suppose you mean "to the same IP" instead of "from the same IP".

2. Tomcat does not care what your DNS server knows.  It does not care
what names match to what addresses.  It operates on data received in
an HTTP request.

Do you know how HTTP protocol operates?

3. useIPVHosts="true"  vs useIPVHosts="false"  are two substantially
different modes of operation

> Something wrong with my configuration?

Well, it works. But it does not do what you wanted.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
You must derive a great deal of pleasure from helping people.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message