3 Replies Latest reply on Jan 17, 2013 10:31 AM by David Sorenson

    Apache serving static content while JBoss serves dynamic?

    David Sorenson Newbie

      We're in the process of converting our WebSphere applications to JBoss. Some of our apps serve all of their content, but others use an IBM custom property to tell the plugin to have Apache serve static content assets (.html, .jpg, etc). While researching methods of implementing this in JBoss, I ran across several places suggesting that simply adding a ProxyPassMatch <regex> ! to my Apache conf would take care of it. However, as soon as I add the line:

      ProxyPassMatch ^(.*\.jpg)$ !

       

      nothing gets sent to JBoss at all, where all the dynamic content was working correctly previously. Fortunately, the .jpg file is now served correctly from Apache. Of course, this isn't as helpful as it might otherwise be without the dynamic content functioning.

       

      We're using Apache 2.2.23, mod_cluster 1.2.4.SNAPSHOT-4, amd JBoss EAP6 all on RHEL (5.8 for Apache server, 6.2 for JBoss).

       

      The JBoss config looks like:

       

      domain.xml:

       

      <subsystem xmlns="urn:jboss:domain:modcluster:1.1">

      <mod-cluster-config proxy-list="webhost1:45015,webhost2:45015" balancer="appdev" advertise="false" excluded-contexts="admin-console,invoker,jbossws,jmx-console,juddi,web-console" load-balancing-group="appdev" connector="https">

      <dynamic-load-provider>

      <load-metric type="busyness"/>

      </dynamic-load-provider>

      </mod-cluster-config>

      </subsystem>

       

      Apache Vhost:

       

      <VirtualHost *:7230>

      ServerName someserver.name.com

      CustomLog logs/someserver.name.com.access_log nscombined env=!dontlog

      ErrorLog logs/someserver.name.com.error_log

      KeepAlive On

      SSLEngine On

      SSLCertificateKeyFile ssl/private/someserver.name.com.key

      SSLCertificateFile ssl/certs/someserver.name.com.cert

      RewriteEngine on

      RewriteRule ^/server-status - [PT,L]

      DocumentRoot /path/to/static/content

      DirectoryIndex index.html index.htm index.jsp

      RewriteCond %{HTTP:X-NS-SSL} !=TRUE

      RewriteRule ^/(.*)$ https://someserver.name.com/$1 [R,L]

      ProxyPassMatch ^(.*\.jpg)$ !

      </VirtualHost>

       

      Any suggestions?