我已经在 Redhat 服务器中使用 mod_wsgi 2.0 和 apache 2.2.3 配置了 Django 1.4。但是当我尝试访问服务器时,我收到以下错误:“错误 500:内部服务器错误。”
[root@lts5srv1 hardi]# wget mritest.domain.ch
--2012-08-23 21:51:27-- http://mritest.domain.ch/
Resolving mritest.domain.ch... 127.0.0.1
Connecting to mritest.domain.ch|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2012-08-23 21:51:27 ERROR 500: Internal Server Error.
所以我有联系,但我没有得到任何有效的回应。它是否取决于 django 版本,我应该使用 Django 1.3 进行部署吗?
编辑
阿帕奇错误日志:
[Thu Aug 23 22:34:04 2012] [error] [client 127.0.0.1] mod_wsgi (pid=7835): Exception occurred processing WSGI script '/home/django_www/hello/apache/django.wsgi'.
[Thu Aug 23 22:34:04 2012] [error] Traceback (most recent call last):
[Thu Aug 23 22:34:04 2012] [error] File "/home/django_www/hello/apache/django.wsgi", line 1, in <module> [Thu Aug 23 22:34:04 2012] [error] import os
[Thu Aug 23 22:34:04 2012] [error] ImportError: No module named os"