我正在尝试在运行Ubuntu 18的笔记本电脑上运行带有mod_wsgi 4.5和python 3.6 / Django的Apache 2.4服务器,但出现500错误。错误是:
[Wed Oct 03 20:17:10.146305 2018] [wsgi:error] [pid 15405:tid 140336693888768] [client 127.0.0.1:33306] mod_wsgi (pid=15405): Target WSGI script '/mnt/4e468d61-1820-41ad-8a44-8a356b024106/COP4331/server-side/webserver/mysite/mysite/wsgi.py' cannot be loaded as Python module.
[Wed Oct 03 20:17:10.146362 2018] [wsgi:error] [pid 15405:tid 140336693888768] [client 127.0.0.1:33306] mod_wsgi (pid=15405): Exception occurred processing WSGI script '/mnt/4e468d61-1820-41ad-8a44-8a356b024106/COP4331/server-side/webserver/mysite/mysite/wsgi.py'.
[Wed Oct 03 20:17:10.147188 2018] [wsgi:error] [pid 15405:tid 140336693888768] [client 127.0.0.1:33306] Traceback (most recent call last):
[...] (for brevity's sake)
[Wed Oct 03 20:17:33.631789 2018] [wsgi:error] [pid 15404:tid 140336685496064] [client 127.0.0.1:33312] import mod_wsgi.server
[Wed Oct 03 20:17:33.631805 2018] [wsgi:error] [pid 15404:tid 140336685496064] [client 127.0.0.1:33312] ModuleNotFoundError: No module named 'mod_wsgi.server'; 'mod_wsgi' is not a package
但是,我绝对将mod_wsgi作为一个软件包-我已经检查了第2点和第3点,并且已经安装了它们。
我没有使用虚拟环境,所以这不是一个因素。我真的很聪明,所以如果有人可以帮助我,我将非常感激。