mod_wsgi,mod_python还是cgi? [英] mod_wsgi, mod_python, or just cgi?

查看:91
本文介绍了mod_wsgi,mod_python还是cgi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩自己的网络服务器(Apache + Ubuntu)和python.根据我所看到的,有3(?)个主要方法可以做到这一点:

I've been playing around with my own webserver (Apache+Ubuntu) and python. From what I've seen there are 3(?) main ways of doing this:

  1. Apache配置为将.py作为cgi处理
  2. Apache配置为使用现在已过时的mod_python(?)
  3. Apache配置为使用mod_wsgi

我记得曾经读过Django更喜欢mod_wsgi,而且我对学习Django颇有兴趣(我听说他们的官方教程非常出色).

I recall reading that Django prefers mod_wsgi, and I'm kinda interested in learning Django (I've heard their official tutorial is rather excellent).

什么是推荐"设置?我认为确实没有理由再使用mod_python了,但是将.py作为cgi和mod_wsgi进行处理之间有什么区别?是否有可能同时运行它们(您愿意吗?),或者这只是一个荒谬的想法,我应该停止思考这些疯狂的事情吗?

What is the 'recommended' setup? I presume there's really no reason to use mod_python anymore, but what are the differences between handling .py as cgi, and mod_wsgi? Is it possible to run them in tandem (and would you want to?), or is that just a ridiculous idea and I should stop thinking such crazy things?

我想我真的只是在寻找Apache + Python的入门知识(链接也很好)-到目前为止,我所遇到的任何事情都无法提供丰富的信息-它们主要只是操作方法.

I guess really I'm just looking for a primer on Apache+Python (links are also good) - nothing I've come across so far has been terribly informative - they were mainly just how-to's.

推荐答案

mod_python 已死,因此对于新项目而言,使用mod_python可能不是一个好主意.就个人而言,我更喜欢使用mod_wsgi而不是CGI(或FastCGI).设置非常简单,而且效率更高.

mod_python is dead, so using mod_python probably isn't a good idea for new projects. Personally, I prefer to use mod_wsgi over CGI (or FastCGI). It's dead-simple to set up, and much more efficient.

这篇关于mod_wsgi,mod_python还是cgi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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