如何修复WSGIDaemonProcess语法错误

时间:2019-12-03 03:47:02

标签: python apache mod-wsgi

困惑。尝试重新启动apache时出现此错误

  

apache2.service的作业失败,因为控制进程退出并显示错误代码。   有关详细信息,请参见“ systemctl status apache2.service”和“ journalctl -xe”。

我跑了systemctl status apache2.service

并退回了此

   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-12-02 22:07:05 EST; 18s ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 443 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Dec 02 22:07:05 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Dec 02 22:07:05 raspberrypi apachectl[443]: AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/piapp.conf:
Dec 02 22:07:05 raspberrypi apachectl[443]: Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration
Dec 02 22:07:05 raspberrypi apachectl[443]: Action 'start' failed.
Dec 02 22:07:05 raspberrypi apachectl[443]: The Apache error log may have more information.
Dec 02 22:07:05 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 02 22:07:05 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 02 22:07:05 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.

这是.conf文件

<VirtualHost *:80>
        ServerName rasberrypi
    WSGIDaemonProcess piapp user=pi group=www-data threads=5
    WSGIScriptAlias / /var/www/piapp/piapp.wsgi
    <Directory /var/www/piapp>
        WSGIProcessGroup app
        WSGIApplicationGroup &{GLOBAL}
        Require all granted
    </Directory>
</VirtualHost>

我尝试将WSGIDaemonProcess piapp user=pi group=www-data threads=5更改为WSGIDaemonProcess app user=pi group=www-data threads=5,因为起初我以为是文件夹的意思,无法正常工作,所以我将其更改为实际的.py应用程序,仍然出现错误。

0 个答案:

没有答案