I am trying to migrate a web server that is using server names
and IPs to implement virtual hosts.
If possible I'd like to maintain the current configuration
as much as possible and not use mod_rewrite in order to
rewrite requests to a single server.
As I understood this should be possible.
I made it to set up two servers with two IPs to serve to virtual
hosts.
Machine 1 listens to hostnames A and B and is meant to backhand
some requests (based on load) to machine 2.
If the requests are answered by machine 1 everything works fine.
However, if requests are fullfilled by the second machine
using a backhand request, they are all directed to the first
virtual host on that machine 2.
Request to Virtual Host A:
Fullfilled by Machine 1: Ok
Fullfilled by Machine 2: Ok
Request to Virtual Host B:
Fullfilled by Machine 1: Ok
Fullfilled by Machine 2: Fail: Processed like request to Virtual Host A.
The HTTP Request Header of the backhand request from machine 1 to 2
also uses "A" as "Host" and is accessing machine 2 on its "A" host
ip.
It is possible to have a configuration desribed as above?
I have included my virtual host configuration. Do you see what
mistake I made?
The backhand diagnostic page looks fine. It shows four entries with
the correct four addresses (column #4).
I have been using mod_backhand 1.2.0 with apache 1.3.19.
Thank you for any hint,
Martin
--
Machine 1:
Listen 217.65.128.25:80
<VirtualHost 217.65.128.25:80>
ServerName a
UnixSocketDir /www/logs/backhand
MultiCastStats 217.65.128.25 225.220.221.20:4445,1
AcceptStats 217.65.128.25
AcceptStats 217.65.128.26
DocumentRoot /www/htdocs/a
</VirtualHost>
<Directory /www/htdocs/a>
Backhand byAge
Backhand byLoad
</Directory>
Listen 217.65.128.75:80
<VirtualHost 217.65.128.75:80>
ServerName b
UnixSocketDir /www/logs/backhand2
MultiCastStats 217.65.128.75 225.220.221.70:4446,1
AcceptStats 217.65.128.75
AcceptStats 217.65.128.76
DocumentRoot /www/htdocs/b
</VirtualHost>
<Directory /www/htdocs/b>
Backhand byAge
Backhand byLoad
</Directory>
Machine 2:
Listen 217.65.128.26:80
<VirtualHost 217.65.128.26:80>
ServerName a
UnixSocketDir /www/logs/backhand
MultiCastStats 217.65.128.26 225.220.221.20:4445,1
AcceptStats 217.65.128.25
AcceptStats 217.65.128.26
DocumentRoot /www/htdocs/a
</VirtualHost>
<Directory /www/htdocs/a>
Backhand byAge
Backhand byLoad
</Directory>
Listen 217.65.128.76:80
<VirtualHost 217.65.128.76:80>
ServerName b
UnixSocketDir /www/logs/backhand2
MultiCastStats 217.65.128.76 225.220.221.70:4446,1
AcceptStats 217.65.128.75
AcceptStats 217.65.128.76
DocumentRoot /www/htdocs/b
</VirtualHost>
<Directory /www/htdocs/b>
Backhand byAge
Backhand byLoad
</Directory>
and IPs to implement virtual hosts.
If possible I'd like to maintain the current configuration
as much as possible and not use mod_rewrite in order to
rewrite requests to a single server.
As I understood this should be possible.
I made it to set up two servers with two IPs to serve to virtual
hosts.
Machine 1 listens to hostnames A and B and is meant to backhand
some requests (based on load) to machine 2.
If the requests are answered by machine 1 everything works fine.
However, if requests are fullfilled by the second machine
using a backhand request, they are all directed to the first
virtual host on that machine 2.
Request to Virtual Host A:
Fullfilled by Machine 1: Ok
Fullfilled by Machine 2: Ok
Request to Virtual Host B:
Fullfilled by Machine 1: Ok
Fullfilled by Machine 2: Fail: Processed like request to Virtual Host A.
The HTTP Request Header of the backhand request from machine 1 to 2
also uses "A" as "Host" and is accessing machine 2 on its "A" host
ip.
It is possible to have a configuration desribed as above?
I have included my virtual host configuration. Do you see what
mistake I made?
The backhand diagnostic page looks fine. It shows four entries with
the correct four addresses (column #4).
I have been using mod_backhand 1.2.0 with apache 1.3.19.
Thank you for any hint,
Martin
--
Machine 1:
Listen 217.65.128.25:80
<VirtualHost 217.65.128.25:80>
ServerName a
UnixSocketDir /www/logs/backhand
MultiCastStats 217.65.128.25 225.220.221.20:4445,1
AcceptStats 217.65.128.25
AcceptStats 217.65.128.26
DocumentRoot /www/htdocs/a
</VirtualHost>
<Directory /www/htdocs/a>
Backhand byAge
Backhand byLoad
</Directory>
Listen 217.65.128.75:80
<VirtualHost 217.65.128.75:80>
ServerName b
UnixSocketDir /www/logs/backhand2
MultiCastStats 217.65.128.75 225.220.221.70:4446,1
AcceptStats 217.65.128.75
AcceptStats 217.65.128.76
DocumentRoot /www/htdocs/b
</VirtualHost>
<Directory /www/htdocs/b>
Backhand byAge
Backhand byLoad
</Directory>
Machine 2:
Listen 217.65.128.26:80
<VirtualHost 217.65.128.26:80>
ServerName a
UnixSocketDir /www/logs/backhand
MultiCastStats 217.65.128.26 225.220.221.20:4445,1
AcceptStats 217.65.128.25
AcceptStats 217.65.128.26
DocumentRoot /www/htdocs/a
</VirtualHost>
<Directory /www/htdocs/a>
Backhand byAge
Backhand byLoad
</Directory>
Listen 217.65.128.76:80
<VirtualHost 217.65.128.76:80>
ServerName b
UnixSocketDir /www/logs/backhand2
MultiCastStats 217.65.128.76 225.220.221.70:4446,1
AcceptStats 217.65.128.75
AcceptStats 217.65.128.76
DocumentRoot /www/htdocs/b
</VirtualHost>
<Directory /www/htdocs/b>
Backhand byAge
Backhand byLoad
</Directory>