【发布时间】:2021-03-09 12:35:26
【问题描述】:
我正在尝试通过 apache2 在 VPS 上运行 django 应用程序,但我在网站错误文件中得到以下内容,也是 400(错误请求):
Exception ignored in: <function Local.__del__ at 0x7f47273f48b0>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 96, in __del__
NameError: name 'TypeError' is not defined
我成功运行了一个使用“django-admin startproject”创建的简单网站并且可以查看,但是上传使用以下框架创建的项目会产生此错误:https://django-project-skeleton.readthedocs.io/en/latest/apache2_vhost.html
我尝试在 WSGIDaemon 中包含 python 站点包,并通过排除它们产生相同的效果。
除此之外,我还补充了:
<Directory /var/www/mysite/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
但同样,没有变化
【问题讨论】: