You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by pt...@intec.ugent.be on 2008/03/05 16:41:27 UTC

[users@httpd] Mod_proxy_balancer issues

Hello,

I'm trying to create two balancers within a single virtual host in order
to distinguish between static content and dynamically generated
(application) data.

I have two webservers; on each one, I run an apache instance for static
content on port 81, documentroot /var/www/html-static and an apache
instance for application data on port 80, documentroot /var/www/html-apps

I've tried the following setup

<VirtualHost _default_:443>

   ProxyRequests Off

   <Proxy *>
     Order deny,allow
     Allow from all
   </Proxy>

   ProxyPass /static/ balancer://static-cluster/
   ProxyPass /apps/ balancer://apps-cluster/

   <Proxy balancer://static-cluster>
     BalancerMember http://web1.domain:81 loadfactor=1
     BalancerMember http://web2.domain:81 loadfactor=1
   </Proxy>

   <Proxy balancer://apps-cluster>
     BalancerMember http://web1.domain:80 loadfactor=1
     BalancerMember http://web2.domain:80 loadfactor=1
   </Proxy>

</VirtualHost>

I've omitted proxypassreverse directives for now, but my general problem
is that getting cluster/static/index html or cluster/apps/index.html
sometimes tries to retrieve the index.html from a wrong apache instance
(ie getting static/... from aport 80 apache when it should connect to port
81 instances).

So my questions are: is what I'm trying to do supported (> 1 balancer in a
single virtual host, depending on the URL accessed), and if so, what am I
conceptually doing wrong in my setup?

(I have already tried lots of different permutations of using / omitting
trailing slashes to the paths mentioned)

Pieter

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Mod_proxy_balancer issues

Posted by pt...@intec.ugent.be.
> Hello,
>
> I'm trying to create two balancers within a single virtual host in order
> to distinguish between static content and dynamically generated
> (application) data.
>
> I have two webservers; on each one, I run an apache instance for static
> content on port 81, documentroot /var/www/html-static and an apache
> instance for application data on port 80, documentroot /var/www/html-apps
>
> I've tried the following setup
>
> <VirtualHost _default_:443>
>
>    ProxyRequests Off
>
>    <Proxy *>
>      Order deny,allow
>      Allow from all
>    </Proxy>
>
>    ProxyPass /static/ balancer://static-cluster/
>    ProxyPass /apps/ balancer://apps-cluster/
>
>    <Proxy balancer://static-cluster>
>      BalancerMember http://web1.domain:81 loadfactor=1
>      BalancerMember http://web2.domain:81 loadfactor=1
>    </Proxy>
>
>    <Proxy balancer://apps-cluster>
>      BalancerMember http://web1.domain:80 loadfactor=1
>      BalancerMember http://web2.domain:80 loadfactor=1
>    </Proxy>
>
> </VirtualHost>
>
> I've omitted proxypassreverse directives for now, but my general problem
> is that getting cluster/static/index html or cluster/apps/index.html
> sometimes tries to retrieve the index.html from a wrong apache instance
> (ie getting static/... from aport 80 apache when it should connect to port
> 81 instances).
>
> So my questions are: is what I'm trying to do supported (> 1 balancer in a
> single virtual host, depending on the URL accessed), and if so, what am I
> conceptually doing wrong in my setup?
>
> (I have already tried lots of different permutations of using / omitting
> trailing slashes to the paths mentioned)
>
> Pieter
>


Some info was missing: the mod_proxy_balancer apache machine is a RHEL 5
machine, apache 2.2.3.


> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org