5 Replies Latest reply on Jul 29, 2009 5:31 AM by Chris Lowe

    Handle default page (mixing mod_cluster with mod_rewrite )

    Chris Lowe Apprentice

      I feel a bit embarrassed asking this because I can't help thinking this has a simple solution and is something that I should know, but...

      Back in the day, with mod_proxy and a single instance of JBoss, I used to use the following mod_rewrite rule to handle the default page in my virtualhost:

      RewriteEngine On
       RewriteCond %{HTTP_HOST} ^cluster\.domain\.com [NC]
       RewriteRule ^/$ /index.html [PT]
      


      Now I'm using mod_cluster, I cannot get this to work. When hitting the URL http://cluster.domain.com/ I just get a 404 from my application. Logging from mod_rewrite says that the rule has matched, but it doesn't make its way through to JBoss.

      BTW - if I enter http://cluster.domain.com/index.html then my app picks this up fine.

      In my application's web.xml I've also tried:

      <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       </welcome-file-list>


      But no luck (not even using JBoss directly). I've even tried various combinations of DirectoryIndex in http.conf - again nothing.

      Can anyone offer any pointers on how to handle this? I've spent far too long on this and I'm waving a white flag in total utter defeat.

      Cheers,

      Chris.