0 Replies Latest reply on Oct 16, 2005 9:22 AM by Ola Theander

    Recomended practice for static content with JBoss/Apache int

    Ola Theander Newbie

      Dear fellow JBoss users

      I?m testing to deploy an application on a server running JBoss 4.03. The server also runs Apache 2.0.54 and forwards .jsp and servlet requests to JBoss using JkMount in the httpd.conf file of Apache.

      My question concerns the recommended practice when it comes to handling static content i.e. .html, .jpg files etc. By creating a web archive (.war) all the content of the web solution is included in that war-file and eventually uploaded to JBoss. As I see it there is three basic ways to manage the static content:

      1) Upload the war-file to JBoss and have a directory mirror containing all the static content that is accessible by Apache. I guess that this is the straight forward, obvious solution but it has the drawback that the content is duplicated, each file is in both the war-file and in the directory mirror.

      2) Configure JBoss to manage all content, i.e. both dynamic (jsp etc) and static. In this way Apache is in practice circumvented but might still be useful for other purposes. The thing is that I unfortunately haven?t been able to successfully configure JBoss/Apache this way. I assumed that it would be basically to add a ?JkMount /* localhost? statement to Apache?s httpd.conf file instead of the common ?JkMount /*.jsp localhost?, but unfortunately it seems like it doesn?t work. Any info how to accomplish this is most welcome since this would be an acceptable solution in this case.

      3) There might be some way for Apache to access the content in the war-file but I don?t know of any one at this stage that allows me to keep all web traffic through port 80, i.e. via Apache. If anybody knows how to accomplish this I?ll be glad to know.

      Any info on the recommended practice for managing static content would be greatly appreciated.

      Kind regards, Ola Theander