在亲和主机用django+mod_wsgi+apache,出现500错误

2011-12-09 18:44:14 +08:00
 pythonfreak
用django+mod_wsgi

在根目录下建立test文件夹,test文件夹里建立project文件夹mysite,test文件夹里添加了配置文件.htaccess和django.wsgi,如下:

[.htaccess]:

AddHandler wsgi-script .wsgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ django.wsgi/$1 [QSA,L]

[django.wsgi]:

import os, sys
sys.path.append(r'/www/dzhaoo01/test/')
sys.path.append(r'/www/dzhaoo01/test/mysite/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

但进入http://dzhaoo01.dearc16.deardns.com/test/ 出现500错误:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.20 (CentOS) Server at dzhaoo01.dearc16.deardns.com Port 80

因为看不到server log error,希望大家能帮忙看下大概是什么问题
我是新手,如果有描述不清楚的,请提问。
6571 次点击
所在节点    Django
1 条回复
deardns
2012-01-15 23:18:51 +08:00
您好,我是亲和主机客服,管理后台有错误日志查看功能,您可以查看下错误日志,如有其他问题请联系客服QQ:1336565691,谢谢。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/23164

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX