httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pi...@goldfisch.at
Subject Re: [users@httpd] strange behaviour of mod_vhost_alias
Date Wed, 20 Nov 2002 01:31:57 GMT
On Tue, Nov 19, 2002 at 11:48:12AM -0500, Joshua Slive wrote:

> 
> Using "*" for NameVirtualHost and <VirtualHost> will not affect the IP
> addressess that apache actually listens on.  It will only make sure that
> any address that reaches that instance of apache will get fed to the
> virtual hosts.  Please use that configuration, because it helps avoid
> silly errors.
> 


*phew*
 I did as you told and the phenomena vanished. But I dont have the
slightest idea why ? I tried to reintroduce the ip-adress and the
phenomena appeared again. (I cant use "*" in the productional server
cause it works on more ip-adresses)

According to your explanation this would mean that there is something
wrong with my ip-adresses. I dont think so. I changed the logformat to
log %V %v and %A (the latter is the local IP) and for all requests the
same ip is logged.

Again: I've two identical <VirtualHost>-Sections (with different
ServerName of course) for two domains. Both domains resolve to the
same IP-Adress.
But the result is different !!

The server is definitely only listing on its single ip-adress
(62.99.149.139) and the requests are only sent to this ip-adress and I
double- and triple checked the name-resolution on the server and the
client.  There should be no different between this two domainnames and
there should be no different between using "*" or using the explicit
IP if there is only IP the server is listening on and the requests are
going to.
  Nevertheless there is - and the problem is reproduceable and its
reproducable on more than one host and the domainname that causes the
problems is *always* the domainname that is the reverse-lookup to the
ip-adress.
  I tested this on three independent systems now (with independent
nameservers, completely different IP's and completely different
domainnames)
 I also reduced my config to a very minimal one to exclude influence
of all other modules and I still have the problem: 


-------full config-----------------------------
ServerRoot "/usr/local/apache2"
 
PidFile logs/pid-139.pid
 
LoadModule log_config_module modules/mod_log_config.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule dir_module modules/mod_dir.so
 
User httpd
Group httpd
 
Listen 62.99.149.139:80
 
LogFormat "%V %v %A %l %u %t \"%r\"" newone
CustomLog /tmp/debug newone
 
NameVirtualHost 62.99.149.139
 
<VirtualHost 62.99.149.139>
ServerName x1.goldfisch.at
DocumentRoot /data/apache/t1
</VirtualHost>
 
<VirtualHost 62.99.149.139>
  VirtualDocumentRoot /data/apache/t-virt
</VirtualHost>
 
<VirtualHost 62.99.149.139>
ServerName c2.goldfisch.at
DocumentRoot /data/apache/t2
</VirtualHost>
 
<VirtualHost 62.99.149.139>
ServerName x2.goldfisch.at
DocumentRoot /data/apache/t2
</VirtualHost>
---------------------------------

x2.goldfisch.at resolves to 62.99.149.139
c2.goldfisch.at resolves to 62.99.149.139

now I do the two queries:

#wget -O - x2.goldfisch.at 
  -> t2

#wget -O - c2.goldfisch.at
  -> t-virt

and now I look at the logs:

c2.goldfisch.at c2.goldfisch.at 62.99.149.139 - - [20/Nov/2002:02:26:07 +0100] "GET / HTTP/1.0"
x2.goldfisch.at x2.goldfisch.at 62.99.149.139 - - [20/Nov/2002:02:26:12 +0100] "GET / HTTP/1.0"


And I really dont know why the result of these two queries is
different. According to all I believe in they should be the same ;)
I think there is something wrong here.

I'm not used to apache-debugging so maybe you could give me one more
hint how to get more detailed logs. Increasing the LogLevel is of no
use here, cause the Problem is not logged as Error in the Error-file.

Thnx a lot for your help,
peter



-- 
mag. peter pilsl
IT-Consulting
tel: +43-699-1-3574035
fax: +43-699-4-3574035
pilsl@goldfisch.at
http://www.goldfisch.at

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