1

Is it still considered best practice to run Apache Tomcat behind an HTTP proxy like Apache HTTPD or Nginx on a Linux server?

A decade ago I was told it was necessary as Tomcat 3 was slow at serving static content, plus it had stability and security issues. AJP was the proxying method of choice.

In 2013 Tomcat 7 is much more stable and secure, and any static content I'd be serving would be via a CDN anyway.

Are there any compelling reasons to have Tomcat sat behind another HTTP server? I'm a developer primarily, so please excuse any ignorance!

slm
  • 7,615
  • 16
  • 56
  • 76
  • 2
    Usually the answer comes down to: benchmark your specific usecase. – ptman Aug 01 '13 at 09:01
  • Only if you need manage a few vhosts on the same ip and port 80. Then you should use some proxy server nginx/apache/etc – ALex_hha Aug 01 '13 at 09:24

1 Answers1

1

From experience there is nothing wrong with a standalone tomcat. We have been doing this since Apache Tomcat 6. We even host our static website with Tomcat. Just because its easier. We serve a couple thousand page views per day. Nothing much. Most of the time the tomcat process is bored. Everything with Tomcat out of the box and now APR/native.

You can use Apache + mod_jk for a load balancer setup. Or for a easier maintenance mode. In case you do rolling updates.

As ptman suggested give it a atry and benchmark your usecase.

raupach
  • 235
  • 1
  • 5