2 Replies Latest reply on Nov 6, 2003 2:10 PM by Steve Davis

    Is apache worth it?

    Steve Davis Newbie

      I've searched to see, but I believe this to be a new question...

      Given JBoss 4.0 embeds tomcat (4.1 at least)... is there any point at all to hiding it all behind Apache httpd? If so, what reason would there be?

      It's tempting to do for that nice comfy familiar feeling, but I'm now questioning why I am even trying to do it.


        • 1. Re: Is apache worth it?
          Jon Barnett Master

          Apache is faster in certain areas because it is native code. So should your site consist or serve a lot of static content aside from the dynamic information, you want Apache to manage the static content. Apache serves static content faster because it is in native code and closer, layer-wise than Tomcat running in a JVM. The same argument applies for SSL as SSL encryption is much faster in Apache than in Tomcat.

          You can also use it as a security shield by putting Apache in the DMZ and allowing only communications from the Apache system to connect to the Tomcat/JBoss AJP13 service.

          A final lesser known reason is that Apache can do some important URL rewriting. If you want your dynamic web site to be able to be web-crawled, you actually need to use URLs that fool crawlers into thinking it is static content. Look at the large news content sites to see the URL mangling to fool crawlers - www.zdnet.com. You need to translate this into a proper URL that Tomcat can understand. Here is where Apache can rewrite the URL back into normal form.

          Apache/Tomcat isn't for all situations - but it is a useful combination under the right circumstances. YMMV.

          • 2. Re: Is apache worth it?
            Steve Davis Newbie

            Thanks, Jon, for that concise and useful answer.