Reputation: 7693
I have a doubt about web server, what is better:
What are the benefits of having HTTP before Tomcat? And what is the best configuration for this redirection?
Upvotes: 2
Views: 1431
Reputation: 4057
I would recommend putting Apache in front of Tomcat for sake of security (more people use certain version of Apache than certain version of Tomcat, so less chances some missing security holes are waiting there).
Also you could use Apache or Varnish Cache for caching static content.
Upvotes: 0
Reputation: 2193
Having web server in front makes more sense, you can put static content to that, and that will be served directly from apache.
Also, if you are planning to have clustered environment then, it can be used as load balancer.
Upvotes: 1
Reputation: 6124
Honestly, it would depend on your environment and application needs. If you have a n-tier architecture with a external facing DMZ, then it makes sense to have Apache in the DMZ which in turn redirects traffic to tomcat. This would improve the security of your application.
Apache also makes sense, if your application has a lot of static content and you want to off load that static content to Apache versus having tomcat serve it.
However, if you want to quickly set this up, say on your desktop, then setting up only tomcat listening on port 80 would be faster.
Upvotes: 2