This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Server Load Balancing to Apache not working V8

We have an astaro gateway that is set in front of two new app servers.  We are currently trying to get the environment set up correctly, but have run into several problems using Astaro's load balancing.

Typically, with Apache, you can have several domain names that point to the same IP and in the Virtual Host block, these are defined by the ServerName variable.  Small example:

[HTML]

    ServerName www.example.com


    ServerName www2.example.com

[/HTML]

We have our application servers set up to handle this, and when using the NAT to route the traffic to a specific server, it works perfectly.  For example, if one server had an internal IP of 1.1.1.1 and we route HTTP traffic from any source bound for that server's external IP (3.3.3.3) to the 1.1.1.1 server, using the above config for apache works fine.  If we point (www1.example.com) to 3.3.3.3 externally (through our public DNS) and www2.example.com to the same IP, you can see both of the web pages.

The problem comes when we try to use the Astaro load balancing.  We turned off all NAT rules for those servers and used a similar apache config for the second server but with an IP of 1.1.2.1.  For our config in the server load balancing, we have HTTP in the service box, the external IP in the virtual server (3.3.3.3) and then the two internal servers as the real servers (1.1.1.1 & 1.1.2.1).  The check type is TCP (we've also tried check URL and have the same problem), and we checked 'Automatic packet filter rules'.  In this case, it seems that the ServerName is not passed down to the real servers, since using either external domain name (www1.example.com or www2.example.com) both point to the first VirtualHost block (whichever it is, usually www1.example.com).  It isn't a browser cache problem, we checked for that.  It seems to be a fundamental difference in how the request gets passed down in the NAT vs. the load balancing.  We need to be able to use multiple VirtualHost blocks and load balance as well, but right now it is not working.  Any help would be appreciated!


This thread was automatically locked due to age.