我应该阿帕奇服务又该Tomcat的服务? [英] What should Apache serve and what should Tomcat serve?

查看:278
本文介绍了我应该阿帕奇服务又该Tomcat的服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图设置Apache Tomcat中的前面。我有什么Apache的服务?我知道的Apache适用于静态页面和图像更好。我目前部署在Tomcat中战争文件,其中包含静态页面,图像和Flash文件。我应该把这些所有的Apache服务器?如何我引用这些网页/从Tomcat应用程序映像?

I'm trying to set up Apache in front of Tomcat. What do I have Apache serve? I know Apache works better for static pages and images. I currently deploy a war file in Tomcat that contains static pages, images, and Flash files. Should I put those all on the Apache server? How to I reference those pages/images from the Tomcat application?

我想使用Apache,以减少战争文件的大小,并希望提供图片速度更快。是否有一个很好的指导了设置Apache和Tomcat,什么的地方在哪里?

I would like to use Apache to decrease the war file size and hopefully serve images faster. Is there a good guide for setting up Apache and Tomcat and what to place where?

推荐答案

你的Tomcat服务器上有性能/负载出了问题?做,如果你需要(性能,安全性等),但不要使事情更加复杂,如果你不需要。

Do you have a problem with performance/load on your Tomcat server? Do it if you need to(performance, security, etc), but don't make things more complicated if you don't need to.

它曾经是标准的,以前面的Tomcat与Apache服务器,但可以(而且通常时间)使用最新的Tomcat版本为两个的HTTP服务器和Servlet容器。

It used to be the standard to front Tomcat with an Apache server, but recent versions of Tomcat can(and often times are) used as both the HTTP Server and the Servlet Container.

看看关于这个问题的信息 Tomcat连接器常见问题解答

Take a look at the Tomcat Connector FAQ for information on the subject.

我为什么要集成与阿帕奇
  Tomcat的? (或没有)

有很多理由去整合
  Tomcat的与Apache。而且有
  原因不应该太完成。
  不用说,每个人都会
  这里的观点不以为然。 随着
  Tomcat的5和6的性能,
  性能方面的原因变得更难
  自圆其说。

...

速度。 Apache的服务速度更快
  静态内容比Tomcat的。但是,除非
  你有一个高流量的网站,这
  一点也没用。但在某些
  情景下,Tomcat可以比快
  阿帕奇的httpd。所以,基准您的网站。
  的Tomcat可以在httpd的速度执行
  使用正确的连接器(APR时
  启用S​​ENDFILE)。速度应
  不能认为当一个因素
  Apache的httpd和之间做出选择
  Tomcat的

Speed. Apache is faster at serving static content than Tomcat. But unless you have a high traffic site, this point is useless. But in some scenarios, tomcat can be faster than Apache httpd. So benchmark YOUR site. Tomcat can perform at httpd speeds when using the proper connector (APR with sendFile enabled). Speed should not be considered a factor when choosing between Apache httpd and Tomcat

这篇关于我应该阿帕奇服务又该Tomcat的服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆