以前我的代码正在使用apache2,django和libapache2-mod-wsgi。但是我不得不使用python3,因此我删除了libapache2-mod-wsgi并安装了libapache2-mod-wsgi-py3。现在我在重新启动apache2时遇到错误。
以下是命令systemctl status apache2.service
的错误。我不知道为什么WSGIScriptAlias不适用于libapache2-mod-wsgi-py3。
The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 7 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not
Action 'configtest' failed.
The Apache error log may have more information.
apache2.service: Control process exited, code=exited status=1
Failed to start LSB: Apache2 web server.
apache2.service: Unit entered failed state.
apache2.service: Failed with result 'exit-code'.