First let me explain what we want to do and what is working so far.
We have four webservers who share the load.
www.client.com
www2.client.com
www3.client.com
www4.client.com
All request get to Host www who ist backhanding a page from the frameset and
redirect to one of the other servers for example www3.
The other hosts just report their statistics to the backhand on host www.
All followup requests will now go directly to www3.
So we only want to backhand "new sessions" and use it as a simple load
balancer.
So far it works.
Now we want to use the same servers also for another project and need to
implement virtual server use.
As i read in the FAQ that can be done with HTTPRedirectToName and format
strings.
So i named the hosts to (so that this name ist displayed in the backhand
status page):
www.hosting.com
www2-4.hosting.com
and configured a virtual host on each server:
www.client.com
www2-4.client.com
Then i configured backhand with this format string:
HTTPRedirectToName %1S.%-2H
to take only the first part from the server choosen by backhand (for example
www3 from www3.hosting.com) and the domain name from the request (in my
example client.com) the get the redirect hostname (in my example
www3.client.com).
<Directory /home/client.com/html/manual/>
Backhand HTTPRedirectToName %1S.%-2H
Backhand removeSelf
Backhand byAge
Backhand byLoad
</Directory>
As long as i tell him to remove himself everything is working as expected.
But wenn i comment this line so that he also should serve pages if he has
nothing to do he always redirects to himself, ignoring what the backhand
statistics are saying.
Anybody knows whats wrong ?!?
Marcus Albrecht
We have four webservers who share the load.
www.client.com
www2.client.com
www3.client.com
www4.client.com
All request get to Host www who ist backhanding a page from the frameset and
redirect to one of the other servers for example www3.
The other hosts just report their statistics to the backhand on host www.
All followup requests will now go directly to www3.
So we only want to backhand "new sessions" and use it as a simple load
balancer.
So far it works.
Now we want to use the same servers also for another project and need to
implement virtual server use.
As i read in the FAQ that can be done with HTTPRedirectToName and format
strings.
So i named the hosts to (so that this name ist displayed in the backhand
status page):
www.hosting.com
www2-4.hosting.com
and configured a virtual host on each server:
www.client.com
www2-4.client.com
Then i configured backhand with this format string:
HTTPRedirectToName %1S.%-2H
to take only the first part from the server choosen by backhand (for example
www3 from www3.hosting.com) and the domain name from the request (in my
example client.com) the get the redirect hostname (in my example
www3.client.com).
<Directory /home/client.com/html/manual/>
Backhand HTTPRedirectToName %1S.%-2H
Backhand removeSelf
Backhand byAge
Backhand byLoad
</Directory>
As long as i tell him to remove himself everything is working as expected.
But wenn i comment this line so that he also should serve pages if he has
nothing to do he always redirects to himself, ignoring what the backhand
statistics are saying.
Anybody knows whats wrong ?!?
Marcus Albrecht