5 Replies Latest reply on Dec 6, 2010 9:15 PM by augustsimonelli

    root context and mod_rewrite

    augustsimonelli

      Hi all,

       

      I have a working mod_cluster 1.0.4 in front of EAP 5.1 (.com). I have been advised to use mod_rewrite and it works well. But i'm curious about the following scenario:

       

      mod_cluster set to expose ROOT. ROOT.war removed from JBoss. /sample deployed to jboss. mod_cluster INFO looks like:

       

      Node: [1],Name: redcloud:8009:jboss.web,Balancer: uat,Domain: ,Host: 192.168.235.128,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 88
      Vhost: [1:1:1], Alias: localhost
      Context: [1:1:1], Context: /sample, Status: ENABLED

       

      When i do:

       

      RewriteRule ^/sample/(.*)$ balancer://uat/sample/$1 [P,L]

       

      and ask for my.url/sample/ it works perfectly.

       

      If i do:

       

      RewriteRule ^/(.*)$ balancer://uat/sample/$1 [P,L]

       

      and go to my.url/ i get a 503 from apache and see

       

      [Wed Dec 01 07:37:20 2010] [debug] mod_proxy_cluster.c(962): get_balancer_by_node balancer NOT found
      [Wed Dec 01 07:37:20 2010] [debug] mod_proxy_cluster.c(962): get_balancer_by_node balancer NOT found
      [Wed Dec 01 07:37:20 2010] [debug] mod_proxy_cluster.c(1137): proxy: byrequests balancer FAILED
      [Wed Dec 01 07:37:20 2010] [error] proxy: CLUSTER: (balancer://uat). All workers are in error state

       

      in the apache logs.

       

      If i put ROOT.war back in, mod_cluster-manager INFO shows:

       

      Node: [1],Name: redcloud:8009:jboss.web,Balancer: uat,Domain: ,Host: 192.168.235.128,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 92
      Vhost: [1:1:1], Alias: localhost
      Context: [1:1:1], Context: /sample, Status: ENABLED
      Context: [1:1:2], Context: /, Status: ENABLED

       

      and my.url/ works (and serves the sameple app under root context).

       

      So, my question is has anyone seen this behavior with mod_cluster and mod_rewrite? I don't mind having a "dummy" app in to make ROOT visible but i don't necessarily want to have to.

       

      August