Thanks again for your suggestions, Matt.  I got it
working by using a slightly different approach.  My
guess is that apache had an issue (again, only with
multiple servers) when the first virtual server was a
redirect.  By changing the httpd.conf section included
earlier to the following one (note the subtle
differences), everything works correctly now:

...
ServerName www.mydomain.com:80
...
NameVirtualHost *:80
<VirtualHost *:80>
   DocumentRoot /var/www/public_html
   ServerName www.mydomain.com
</VirtualHost>
<VirtualHost *:80>
   Redirect permanent / http://www.mydomain.com/
   ServerName mydomain.com
</VirtualHost>
<VirtualHost *:80>
   DocumentRoot /var/www/partner1
   ServerName partner1.mydomain.com
</VirtualHost>
... 

Cheers,
Anton


--- matt farey <[EMAIL PROTECTED]> wrote:

> anton wrote:
> > Thanks, Matt.  I'll try the packet sniffer next. 
> > Meanwhile, I narrowed the problem down to virtual
> > hosts.  Here's the http.conf on each server:
> >
> > ...
> > ServerName mydomain.com:80
> > ...
> > NameVirtualHost *:80
> > # redirect mydomain.com to www.mydomain.com
> > # has to match ServerName above
> > <VirtualHost *:80>
> >    Redirect permanent / http://www.mydomain.com/
> >    ServerName mydomain.com
> > </VirtualHost>
> > # provide webroot for the above redirect
> > <VirtualHost *:80>
> >    DocumentRoot /var/www/public_html
> >    ServerName www.mydomain.com
> > </VirtualHost>
> > # allow partner1.mydomain.com to work
> > <VirtualHost *:80>
> >    DocumentRoot /var/www/partner1
> >    ServerName partner1.mydomain.com
> > </VirtualHost>
> > ... 
> >
> > So, this makes 10% of the requests fail.  If I
> comment
> > out all of the virtual host stuff above,
> everything
> > works (but then, of course, I don't get canonical
> > hostname or partner1 to work).
> >
> > Anton
> >
> >   
> 
> First thing, say you have load balancer L in front
> of A and B, do
> 
> mydomain.com, www.mydomain.com and
> partner1.mydomain.com
> 
> all resolve to machine A from A, and to B when on B?
> sit on A and perform nslookup for the hosts do they
> return A's IP, what for B?
> 
> I am thinking here that www.mydomain.com might be
> resolving back to L which forwards onto A or B, and
> the loop continues, resulting in the hard redirect
> limit being reached. You could verify this using
> fiddler or paros while making the request. If the
> _browsers_ hard redirect limit is reached you will
> see. If it is a limit with the server it will show
> up with Wireshark.
> 
> That's all I can think of really. Sorry.
> 
> 
> 
> 
>
---------------------------------------------------------------------
> 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:
> [EMAIL PROTECTED]
>    "   from the digest:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to