简体   繁体   English

使用Apache Tomcat运行Thin?

[英]Run Thin with Apache Tomcat?

I have a JRuby on Rails app that requires event-based server like Thin to run. 我有一个JRuby on Rails应用程序,需要运行基于事件的服务器(如Thin) The problem is the app must be deployed to a Java web container like Apache Tomcat by building WAR file with Warbler . 问题在于必须通过使用Warbler构建WAR文件,将应用程序部署到Java Web容器(如Apache Tomcat)。

Is there anyway I can setup Tomcat proxy to Thin so I can serve my Rails application ? 无论如何,我可以将Tomcat代理设置为Thin,以便为Rails应用程序提供服务吗? Or something like Phusion Passenger/Nginx ? 还是类似Phusion Passenger / Nginx的东西?

Depends on how EventMachine is being used and what for. 取决于如何使用EventMachine及其用途。 You could write your own Webserver using EM: http://www.franzens.org/2011/10/writing-minimalistic-web-server-using.html 您可以使用EM编写自己的Web服务器: http : //www.franzens.org/2011/10/writing-minimalistic-web-server-using.html

There are also Webserver Gems out there: https://github.com/alor/em-http-server 也有Webserver Gems: https//github.com/alor/em-http-server

I wanted to use some EM Gems in my app and just started an EM-Loop (EM.run {}) in my app, inside Tomcat/Trinidad. 我想在我的应用程序中使用一些EM Gems,然后在Tomcat / Trinidad内的应用程序中启动了一个EM-Loop(EM.run {})。

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

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