在Apache服务器Centos 7上部署Django项目

时间:2020-02-28 07:29:21

标签: django python-3.x apache

我在Apache服务器上的Django项目中遇到了很多麻烦。错误提示:

内部服务器错误服务器遇到内部错误或 配置错误,无法完成您的请求。

这里是virtualHost

<VirtualHost *:8000>
    DocumentRoot /var/www/reactive

    WSGIPassAuthorization On
    WSGIDaemonProcess reactive python-path=/var/www/reactive:/var/www/venv3/lib/python3.6/site-packages
    WSGIProcessGroup src
    WSGIScriptAlias / /var/www/reactive/src/wsgi.py

    ErrorLog /var/www/reactive/logs/error.log
    CustomLog /var/www/reactive/logs/custom.log combined

    <Directory /var/www/reactive/src>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>
</VirtualHost>

问题是,当我手动运行服务器时,服务器几乎可以正常工作。 python3 manage.py runserver 0.0.0.0:8000,但是当我尝试使其继续以virtualHost的身份运行时,就会弹出上述问题。我是否缺少有关virtualHost:8000

的代码的某些东西

这是venv3reactive的文件夹结构

folders

我另外检查了systemctl status httpd.service

2月28日16:25:44 cpanel.example.com systemd 1:启动Apache HTTP服务器... 2月28日16:25:44 cpanel.example.com httpd [23540]:[星期五 2月28日16:25:44.919001 2020] [so:warn] [pid 23540] AH01574:模块 wsgi_module已加载,正在跳过2月28日16:25:44 cpanel.example.com httpd [23540]:[2020年2月28日星期五16:25:44.919548 [so:warn] [pid 23540] AH01574:模块php7_module已加载, 跳过2月28日16:25:45 cpanel.example.com systemd 1:开始了 Apache HTTP服务器。

,看起来还好。

0 个答案:

没有答案
相关问题