姜戈 + Fedora Core 9 上的 FCGID ——我错过了什么?

发布于 2024-07-05 17:55:14 字数 1429 浏览 15 评论 0原文

Fedora Core 9 似乎有 FCGID 而不是 FastCGI 作为预构建的、YUM 管理的模块。 [我不想在 YUM 之外维护模块; 所以我或我的系统管理员不需要手动构建。]

我正在尝试通过 runfastcgi 界面启动 Django(根据 FastCGI 部署 文档)。

我看到的是写入 error_log 的结果页面。 它不会通过 Apache 返回到我的浏览器。 此外,还有一堆消息——显然来自 flup 和 WSGIServer——表明 WSGI环境没有正确定义。

  1. FastCGI 是否可用于 FC9,而我只是忽略了它?

  2. FCGID 和 flup 是否真的为 Django 创建了必要的 WSGI 环境? 如果是这样,您可以分享您正在使用的 .fcgi 接口脚本吗? 我的是从 Django 文档中的 mysite.fcgi 复制的。 FCGID Documentations 页面暗示支持 PHP 和 Ruby——直接支持 PHP,通过dispatch.fcgi -- 并且不支持 Python。

更新。 错误消息是...

WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! 
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!

我应该放弃船舶并切换到 mod_python 并放弃这种方法吗?

Fedora Core 9 seems to have FCGID instead of FastCGI as a pre-built, YUM-managed module. [I'd rather not have to maintain a module outside of YUM; so no manual builds for me or my sysadmins.]

I'm trying to launch Django through the runfastcgi interface (per the FastCGI deployment docs).

What I'm seeing is the resulting page written to error_log. It does not come back through Apache to my browser. Further, there are a bunch of messages -- apparently from flup and WSGIServer -- that indicate that the WSGI environment isn't defined properly.

  1. Is FastCGI available for FC9, and I just overlooked it?

  2. Does FCGID and flup actually create the necessary WSGI environment for Django? If so, can you share the .fcgi interface script you're using? Mine is copied from mysite.fcgi in the Django docs. The FCGID Documentations page drops hints that PHP and Ruby are supported -- PHP directly, and Ruby through dispatch.fcgi -- and Python is not supported.

Update. The error messages are...

WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! 
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!

Should I abandon ship and switch to mod_python and give up on this approach?

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

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

发布评论

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

评论(1

没有伤那来痛 2024-07-12 17:55:14

您为什么不尝试modwsgi? 这听起来是目前 WSGI 应用程序(例如 Django)的首选方式。

如果您不想为 Fedora Core 编译东西,那可能会更棘手。

关于你的第一个问题, 似乎解决了fcgid配置问题。

请注意,您不想像这样手动运行 django 应用程序:python manage.py runfcgi,如果设置正确并通过 touch your 重新启动,fcgi 会由 apache 自动运行。 fcgi

Why don't you try modwsgi? It sounds as the preffered way these days for WSGI applications such as Django.

If you don't wan't to compile stuff for Fedora Core, that might be trickier.

Regarding to your first question, this seems to solve the fcgid configuration problem.

Note that you don't want to run the django application manually like this: python manage.py runfcgi, the fcgi is run by apache automatically if the setup is correct and restarted by touch your.fcgi.

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