Mongrel Rails 启动时启动和停止另一个进程

发布于 2024-07-29 06:42:02 字数 114 浏览 2 评论 0原文

我想在 mongrel Rails 启动时启动另一个进程。 有没有办法做到这一点? 我希望在每次 Rails 启动时启动 lig​​httpd,它在我的项目中充当媒体服务器,并在每次 Rails 停止时停止它。

I would like to start another process when mongrel rails starts up. Is there a way to do this? I am looking to start lighttpd which acts as a media server on my project every time rails starts and stop it every time rails stops.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

流年里的时光 2024-08-05 06:42:02

编写一个新的初始化脚本,用于在启动 mongrel 集群时启动 lig​​httpd。 将其设置为可执行并将其放置在其他初始化脚本所在的位置(在基于 Debian 的发行版上为 /etc/init.d/)。

  • 启动: 启动 mongrel 集群并启动 lig​​httpd
  • 停止: 停止 mongrel 集群并停止 lighttpd
  • 重新启动: 停止并启动

Write a new init script for starting lighttpd when you start the mongrel cluster. Set it to be executable and place it where your other init scripts reside (/etc/init.d/ on Debian based distributions).

  • Start: Start the mongrel cluster and start lighttpd
  • Stop: Stop the mongrel cluster and stop lighttpd
  • Restart: Stop and start
丶视觉 2024-08-05 06:42:02

不明白为什么你不能将 lighttp 配置为 mongrel 集群的反向代理,甚至不能将 nginx 与乘客一起使用

Dont see why you cant configure lighttp as a reverse proxy for a mongrel cluster or even use nginx with passenger

叫嚣ゝ 2024-08-05 06:42:02

如果您使用 nginx/Apache(我更喜欢 nginx)在乘客上运行您的应用程序,那么为什么您选择的 Web 服务器不能只提供静态文件呢?

If you use nginx/Apache (nginx is my preference) to run your app on passenger then why couldn't your chosen web server just serve your static files?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文