V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
pythonfreak
V2EX  ›  Django

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

  •  
  •   pythonfreak · 2011-12-09 18:44:14 +08:00 · 6535 次点击
    这是一个创建于 4493 天前的主题,其中的信息可能已经有所发展或是发生改变。
    用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,希望大家能帮忙看下大概是什么问题
    我是新手,如果有描述不清楚的,请提问。
    1 条回复    1970-01-01 08:00:00 +08:00
    deardns
        1
    deardns  
       2012-01-15 23:18:51 +08:00
    您好,我是亲和主机客服,管理后台有错误日志查看功能,您可以查看下错误日志,如有其他问题请联系客服QQ:1336565691,谢谢。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3295 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 00:40 · PVG 08:40 · LAX 17:40 · JFK 20:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.