httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd]
Date Thu, 30 Apr 2009 13:44:14 GMT
Rocco Scappatura wrote:
> Thanks Karel for your answer.
> 
> On Mer, 29 Aprile 2009 19:34, Karel Kubat wrote:
>>> <VirtualHost *:80>
>>>    ServerAdmin webmaster@mysite.it
>>>    DocumentRoot "C:/Apache2.2/htdocs/virtualhost2"
>>>    ServerName virtualhost.mysite.it
>>>    ErrorLog "logs/virtualhost.mysite.it-error_log"
>>>    CustomLog "logs/virtualhost.mysite.it-access_log" common
>>> </VirtualHost>
>>>
> 
> I forgot to mention the default virtual host just before the one above
> that is sit in my virtual host conf file:
> 
> <VirtualHost *:80>
> 	ServerName www.mysite.it
> 	DocumentRoot "C:/Apache2.2/htdocs"
> </VirtualHost>
> 
>> Please read http://httpd.apache.org/docs/2.2/vhosts/name-based.html
>> Basically you will need two virtual hosts listening to *:80. The first
>> one must have a ServerAlias www.mysite.it and the second one
>> virtualhost.mysite.it.
>>
>> That should do the trick.
> 
> Anyway I added the ServerAlias directive as well but nothing of good has
> happened.. :-(
> 
> Please read what I report below again (I think that this is the key of the
> mistake):
> 
>>> Basically it happens that the request for http://www.virtualhost.it is
>>> seen by
>>> Apache as a request for / (no matter what is the virtual host) and so
> proxied to Tomcat.
> 
> So I think that the header Host: is considered after mod_proxy and so the
> request is forwarded to Tomcat.
> 
With respect, I think that this does not make sense.
Apache has to first parse the Host: header, before it even knows which 
<VirtualHost> should handle the request.  So it can certainly not apply 
any specific VirtualHost section directive before it has read and 
understood this header.

Think of another scenario to confirm/deny.
;-)



---------------------------------------------------------------------
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