我可以在同一个Apache服务器上运行Python Django和Ruby吗? [英] Can I run Python Django and Ruby on the same Apache server?

查看:189
本文介绍了我可以在同一个Apache服务器上运行Python Django和Ruby吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ModWSGI在Apache2上运行Python Django,我想在同一个服务器上运行Ruby on Rails。



可以这样做吗? p>

我看到,Ruby on Rails的Passenger也可以支持Django。



欢迎任何帮助。
谢谢。

解决方案

是的,我已经完成了。因为这些模块的工作原理,我不建议为一个忙碌或容易加载尖峰的服务器,而是将代码嵌入到服务器进程本身(尽管mod_wsgi比mod_python更好)。



当我做HEAD时 http://my.dev.server 回复标题包括这个:
服务器:Apache / 2.2.8(Ubuntu)DAV / 2 Phusion_Passenger / 2.2.15 PHP / 5.2.4-2ubuntu5.10与Suhosin-Patch mod_wsgi / 1.3 Python / 2.5.2



例如,如果您有40个apache子进程添加mod_wsgi可能会为每个添加几个RAM,所以使用的RAM可能会增加100MB。添加phusion乘客导致每个孩子使用另外5 MB的RAM增加200MB更多。



但是,如果你有10个apache子进程,这不是一个巨大的交易



如果您处于获得这些忙碌时段的服务器上,那么获得更好结果的一种方法是使用nginx而不是Apache(或使用apache的fastcgi)。它不将任何应用程序代码嵌入到http进程中。


I'm runnig Python Django on Apache2 with ModWSGI and I would like to run Ruby on Rails on the same server.

Is it possible do this?

I read that Passenger for Ruby on Rails can support Django too.

Any help is welcome. Thanks.

解决方案

Yes, I've done it. I would not suggest doing it for a server that is busy or prone to load spikes because of the way these modules work, they embed code into the server process itself (though mod_wsgi is better than mod_python for this).

When I do HEAD http://my.dev.server the response headers include this: Server: Apache/2.2.8 (Ubuntu) DAV/2 Phusion_Passenger/2.2.15 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_wsgi/1.3 Python/2.5.2

For example, if you have 40 apache child processes adding mod_wsgi may add a couple megs of RAM to each, so used RAM may go up by 100MB. Adding phusion passenger made cause each child to use another 5 MB of RAM increasing it by 200MB more.

However, if you have 10 apache child processes this is not a huge deal.

If you are on a server that gets these busy periods then one way to achieve better results is to use nginx instead of Apache (or fastcgi with apache). It does not embed any of the application code into the http process.

这篇关于我可以在同一个Apache服务器上运行Python Django和Ruby吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆