大网数据广告活动
服务器运维问答

Is it necessary to use nginx server to use with tomcat

· 52CE 我爱测

Is it necessary to install nginx server before using apache tomcat. Can we use only apache tomcat is there any pros cons which choice is better and why. I am using fedora 22 for deploying my application on tomcat 8 for java appli…

问题原文

原帖链接 · xrcwrn · CC BY-SA 3.0

Is it necessary to install nginx server before using apache tomcat. Can we use only apache tomcat is there any pros cons which choice is better and why. I am using fedora 22 for deploying my application on tomcat 8 for java application

社区高分解答

原帖链接 · h22 · CC BY-SA 4.0

It is possible to use Tomcat alone, however you need to avoid some obvious mistakes. Most important

  • Run your Tomcat on a separate user account with minimal rights.
  • When not running as root, Tomcat will not be able to bind the privileged port that is a good security feature, not a problem. In these days I usually use xinetd to move the port. I used iptables before, it is more complex but also works fine.
  • Do not forget to update both Tomcat and Java periodically.
  • Block all possible ports with firewall, especially all kinds of "remote management". Only leave that you really need and use.

Do not even think about

  • Running Tomcat as root.
  • Leaving any of the Tomcat web management interfaces. Uninstall immediately. They have never offered anything that our could not do from the command line even faster.
  • Running without firewall.

I do not see Tomcat as complex to configure and maintain, but this is maybe because I am using it for many years. Speaking about security issues, every server has them time to time, and discovered issues are periodically fixed. Just google.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-08-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。