本文介绍了如何设置mod_wsgi的Apache和Django的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我知道已经有很多关于这个主题的信息,但他们是有相当笨拙,不那么简单和前pressive。任何人都可以解释我如何使用 Django的和的mod_wsgi 和阿帕奇?I know that there are already a lot of information on this topic, but they are quite clumsy, not so simple and expressive.Could anyone explain me how to use django and with mod_wsgi and apache?推荐答案 mod_wsgi的不是特别运行的Python WSGI应用的最佳配合,或者,如果您愿意,也有更Python的方式你可以运行你的Django实例。mod_wsgi isn't particularly the best fit for running Python WSGI applications, or, if you'd rather, there are more pythonic ways you can run your Django instance.首先,我想原因,它需要花费大量的精力去理解Apache的请求处理模式,并正确地配置,尤其是相对于mod_wsgi的。如果你不完全设置或锁定到使用Apache,我建议你看一看运行产卵或的绿色独角兽,像后面一个@ neo的 nginx的代理建议。First off, I'd reason that it takes a lot of effort to understand Apache's request processing model and to configure it correctly, especially with respect to mod_wsgi. If your not exactly set or locked into using Apache, I would recommend that you take a look at running Spawning or Green Unicorn, behind a nginx proxy like @Neo suggested.产卵和gunicorn都是可笑的快,不要求您编译Apache与特定的Python间preTER和逐步更新code的基础上飞提供支持,钩Django和其他物品盒子外面。 nginx的,产卵和gunicorn都有一个简单的处理模式,要完全相互独立的,所以你得到一个更加透明的架构,更容易维护和监控。Spawning and gunicorn are both ridiculously fast, don't require that you compile Apache with a specific Python interpreter and provide support for progressively updating your code base on the fly, hooks for Django and other goodies out of the box. nginx, Spawning and gunicorn all have a simple processing model, are kept completely independent of each other, so you get a more transparent architecture that is easier to maintain and monitor.下面是关于建立由Eric Florenzano使用Django产卵一个伟大的指南,这里是一个与该项目的作者,伯努瓦Chesneau gunicorn运行的Django彻底presentation 。Here's a great guide on setting up Spawning with Django by Eric Florenzano, and here's a thorough presentation on running Django with gunicorn by the project's author, Benoît Chesneau.无论你选择,你会感觉右@Home。Whichever you choose, you'll be feeling right @home. 这篇关于如何设置mod_wsgi的Apache和Django的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
06-27 11:26