Can i deploy my .war on an nginx server

不问归期 提交于 2021-01-20 16:27:59

问题


I really love nginx for the stability and way requests are handled.

And i really love tomcat for the java and the user friendliness

Is there a way to deploy my .war on a nginx server ?


回答1:


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. 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.

A quick Google search came up with this http://wiki.nginx.org/JavaServers which might give you what you're looking for.




回答2:


Please try either of

  1. Use Nginx as a reversed proxy in the front of Tomcat OR
  2. Use nginx-tomcat8 to embedding Tomcat into Nginx to run war


来源:https://stackoverflow.com/questions/29452141/can-i-deploy-my-war-on-an-nginx-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!