无效的命令WSGIDaemonProcess在CentOS 6.7上部署Django应用程序 [英] Invalid command WSGIDaemonProcess Deploy Django application on CentOS 6.7

查看:575
本文介绍了无效的命令WSGIDaemonProcess在CentOS 6.7上部署Django应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using Django 1.8 on CentOS 6.7 with Apache Server version: Apache/2.2.15 (Unix).

我已按照

I have followed the steps in How To Serve Django Applications with Apache and mod_wsgi on CentOS 7. But at last step when I start the Apache server with command : service httpd start instead of systemctl start httpd beacuse I have Centos 6.7 not CentOS 7 according to tutorial.

出现以下错误:

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:

you can check the django.conf here:

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.8 CentOS 6.7 上部署的其他选项.

Thanks in advance.Please suggest any other option to deploy on CentOS 6.7 with djnago 1.8.

推荐答案

通过运行

sudo a2enmod wsgi

如果未安装,请执行以下命令进行安装

if its not installed, execute below commands to install

对于python2

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

对于python3

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

这篇关于无效的命令WSGIDaemonProcess在CentOS 6.7上部署Django应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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