Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 81086 invoked from network); 30 Jul 2007 13:01:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 13:01:28 -0000 Received: (qmail 95787 invoked by uid 500); 30 Jul 2007 13:01:18 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 94933 invoked by uid 500); 30 Jul 2007 13:01:16 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 94922 invoked by uid 99); 30 Jul 2007 13:01:16 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 06:01:16 -0700 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nes.yarug@gmail.com designates 66.249.82.237 as permitted sender) Received: from [66.249.82.237] (HELO wx-out-0506.google.com) (66.249.82.237) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 13:01:09 +0000 Received: by wx-out-0506.google.com with SMTP id h27so1247373wxd for ; Mon, 30 Jul 2007 06:00:48 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=PGFqsMXlKvHO0qs4kjR2E91rztHJa4ng23AAJhSk1axPn6f0nNzhUtVd+zt/+8SwJFxq3E8Pk5QG7gyShklzYa6TD8o6NHD24OxCftdotpffpfVUK0St+MHo7xqz9all2rGlrhbq3JmcCxnGpIZA9rjVH3uHZL70nGZp9Y5p1J4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=rXzv+Z9rzIJzcbFDBsDKYjAz+kIgyT0//XVXwJKsF5UTuXpRuT2HWbO8zPoC9VxvBQ1yi0Mc7haEpUU1fxe4+eq73yp3/MWlr+7fkL6zU3Zn55To77BIrzkreh11NM2CoH//Gk50hNZ6MwQdy1h/ZZU/g9rUnXf0a/1/sMkXPMc= Received: by 10.90.95.11 with SMTP id s11mr1714474agb.1185800447881; Mon, 30 Jul 2007 06:00:47 -0700 (PDT) Received: by 10.90.28.8 with HTTP; Mon, 30 Jul 2007 06:00:47 -0700 (PDT) Message-ID: <1acb811b0707300600y6645a4d8t8dc9e31a3933e15b@mail.gmail.com> Date: Mon, 30 Jul 2007 15:00:47 +0200 From: "Nes Yarug" To: users@httpd.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_35455_27614932.1185800447631" X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Two proxy balancers in two different virtual hosts ------=_Part_35455_27614932.1185800447631 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, Another proxy balancer question from me, this one has been driving me nuts... My setup is as follows: 1 Gateway --> 1 Webserver X ---> 1 Application server 1 Webserver Y --> This setup should handle two web applications served on two different domains. The application server is running two different instances of JBoss. The point is to have www.domain-a.com handled by one instance of JBoss and www.domain-b.com handled by the other instance of JBoss. I have configured JBoss so that app-a is served on port 8080 and app-b on port 8180. This is working correctly if I access app-a or app-b from the application server itself. The gateway is running Apache 2.2.4 and I have two vhosts defined, a default one for www.domain-a.com and another one for www.domain-b.com: ServerName www.domain-a.com:80 ServerAdmin root@domain-a.com DocumentRoot "/var/www/localhost/htdocs" ServerEnvironment apache apache ProxyPass / balancer://default/ stickysession=jsessionid ProxyPreserveHost On BalancerMember http://192.168.0.2:80 BalancerMember http://192.168.0.3:80 ServerName www.domain-b.com:80 ServerAdmin root@domain-b.com DocumentRoot "/var/www/localhost/htdocs" ProxyPass / balancer://domain-b/ stickysession=jsessionid ProxyPreserveHost On BalancerMember http://192.168.0.2:80 BalancerMember http://192.168.0.3:80 Then, webserver X and webserver Y have the following configuration: ServerName www.domain-a.com ServerAdmin root@domain-a.com DocumentRoot "/var/www/localhost/htdocs" ProxyPass / balancer://default/ stickysession=jsessionid ProxyPreserveHost On BalancerMember http://192.168.0.4:8080 ServerEnvironment apache apache ServerName www.domain-b.com:80 ServerAdmin root@domain-b.com DocumentRoot "/var/www/localhost/htdocs" ProxyPass / balancer://domain-b/ stickysession=jsessionid ProxyPreserveHost On BalancerMember http://192.168.0.4:8180 ServerEnvironment apache apache Can anyone comment on the above configuration? A few things that indicate something is configured wrong: *) When I look at the balancer manager page for BOTH domain-a ( www.domain-a.com/balancer-manager) and domain-b ( www.domain-b.com/balancer-manager) it ALWAYS only lists the domain-b balancer. *) Requests for www.domain-a.com AND www.domain-b.com ALWAY end up on the JBoss instance for domain-a Any help greatly appreciated. Yours truly, Nes ------=_Part_35455_27614932.1185800447631 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all,

Another proxy balancer question from me, this one has been driving me nuts...

My setup is as follows:

1 Gateway --> 1 Webserver X ---> 1 Application server
                      1 Webserver Y -->

This setup should handle two web applications served on two different domains. The application server is running two different instances of JBoss. The point is to have www.domain-a.com handled by one instance of JBoss and www.domain-b.com handled by the other instance of JBoss. I have configured JBoss so that app-a is served on port 8080 and app-b on port 8180. This is working correctly if I access app-a or app-b from the application server itself.

The gateway is running Apache 2.2.4 and I have two vhosts defined, a default one for www.domain-a.com and another one for www.domain-b.com :

<VirtualHost _default_:80>

        ServerName www.domain-a.com:80
        ServerAdmin root@domain-a.com
        DocumentRoot "/var/www/localhost/htdocs"

        <IfModule mpm_peruser_module>
                ServerEnvironment apache apache
        </IfModule>

        ProxyPass / balancer://default/ stickysession=jsessionid
        ProxyPreserveHost On

        <Proxy balancer://default/>
                BalancerMember http://192.168.0.2:80
                BalancerMember http://192.168.0.3:80
        </Proxy><VirtualHost www.novaeres.com:80>

</VirtualHost>

<VirtualHost www.domain-b.com:80 >

        ServerName www.domain-b.com:80
        ServerAdmin root@domain-b.com
        DocumentRoot "/var/www/localhost/htdocs"

        ProxyPass / balancer://domain-b/ stickysession=jsessionid
        ProxyPreserveHost On

        <Proxy balancer://domain-b/>
                BalancerMember http://192.168.0.2:80
                BalancerMember http://192.168.0.3:80
        </Proxy>

</VirtualHost>

Then, webserver X and webserver Y have the following configuration:

<VirtualHost _default_:80>
        ServerName www.domain-a.com
        ServerAdmin root@domain-a.com
        DocumentRoot "/var/www/localhost/htdocs"

        ProxyPass / balancer://default/ stickysession=jsessionid
        ProxyPreserveHost On

        <Proxy balancer://default/>
                BalancerMember http://192.168.0.4:8080
        </Proxy>

        <IfModule mpm_peruser_module>
                ServerEnvironment apache apache
        </IfModule>
</VirtualHost>

<VirtualHost www.domain-b.com:80>
        ServerName www.domain-b.com:80
        ServerAdmin root@domain-b.com
        DocumentRoot "/var/www/localhost/htdocs"
        ProxyPass / balancer://domain-b/ stickysession=jsessionid
        ProxyPreserveHost On
        <Proxy balancer://domain-b/>
                BalancerMember http://192.168.0.4:8180
        </Proxy>
        <IfModule mpm_peruser_module>
                ServerEnvironment apache apache
        </IfModule>
</VirtualHost>

Can anyone comment on the above configuration? A few things that indicate something is configured wrong:

*) When I look at the balancer manager page for BOTH domain-a (www.domain-a.com/balancer-manager) and domain-b (www.domain-b.com/balancer-manager ) it ALWAYS only lists the domain-b balancer.
*) Requests for www.domain-a.com AND www.domain-b.com ALWAY end up on the JBoss instance for domain-a

Any help greatly appreciated.

Yours truly,
Nes
------=_Part_35455_27614932.1185800447631--