gpt4 book ai didi

python - 无效命令 WSGIDaemonProcess 在 CentOS 6.7 上部署 Django 应用程序

转载 作者:太空狗 更新时间:2023-10-29 17:05:46 25 4
gpt4 key购买 nike

我在 CentOS 6.7 上使用 Django 1.8Apache 服务器版本:Apache/2.2.15 (Unix)。

我已按照 How To Serve Django Applications with Apache and mod_wsgi on CentOS 7. 中的步骤进行操作但是最后一步,当我使用命令启动 Apache 服务器时:service httpd start 而不是 systemctl start httpd 因为我有 Centos 6.7 而不是 CentOS 7根据教程。

出现以下错误:

Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/django.conf:
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module ot included in the server configuration

你可以在这里检查 django.conf:

Alias /static /home/ftpispy/ispy/static
<Directory /home/ftpispy/ispy/static>
Require all granted
</Directory>
<Directory /home/ftpispy/ispy/ispy>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess ispy python-path=/home/ftpispy/ispy:/home/ftpispy/ispy/venv/lib/python2.7/site-packages
WSGIProcessGroup ispy
WSGIScriptAlias / /home/ftpispy/ispy/ispy/wsgi.py

提前致谢。请建议使用 djnago 1.8CentOS 6.7 上部署的任何其他选项。

最佳答案

确保你已经安装了 wsgi 包,通过运行

sudo a2enmod wsgi

如果没有安装,执行下面命令安装

对于 python2

sudo apt-get install python-pip apache2 libapache2-mod-wsgi

对于 python3

sudo apt-get install python3-pip apache2 libapache2-mod-wsgi-py3

关于python - 无效命令 WSGIDaemonProcess 在 CentOS 6.7 上部署 Django 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33320889/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com