简体   繁体   English

我可以在nginx服务器上部署.war吗?

[英]Can i deploy my .war on an nginx server

I really love nginx for the stability and way requests are handled. 我真的很喜欢nginx的稳定性和处理请求的方式。

And i really love tomcat for the java and the user friendliness 我真的很喜欢tomcat的java和用户友好性

Is there a way to deploy my .war on a nginx server ? 有没有办法在nginx服务器上部署我的.war?

I don't believe this is possible as nginx is not a servlet container, so it has no understanding of what a .war file is. 我不相信这是可能的,因为nginx不是servlet容器,因此它不了解.war文件是什么。 You can configure nginx to act as a reverse proxy in front of a Tomcat server so this might get you the best of both worlds. 您可以将nginx配置为在Tomcat服务器前充当反向代理,这样可以让您获得两全其美的效果。

A quick Google search came up with this http://wiki.nginx.org/JavaServers which might give you what you're looking for. 这个http://wiki.nginx.org/JavaServers可以快速搜索谷歌,它可能会为您提供所需的信息。

Please try either of 请尝试其中任何一个

  1. Use Nginx as a reversed proxy in the front of Tomcat OR 在Tomcat OR前面使用Nginx作为反向代理
  2. Use nginx-tomcat8 to embedding Tomcat into Nginx to run war 使用nginx-tomcat8将Tomcat嵌入到Nginx中以运行war

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM