2010-07-21 65 views
0

我是新来的,卡住了。什么会导致Django运行时没有错误,当我做python manage.py运行服务器,但然后抛出内部服务器错误,当我试图通过网络访问它?我有另一个项目在第一个Django驱动的页面上给出了恭喜,并且我得到了与此项目最初相同的.wsgi文件的相同结果。Django内部服务器错误

直到我试图安装这个脚本在massivecoupon项目,我得到了内部服务器错误:

http://github.com/coulix/Massive-Coupon---Open-source-groupon-clone

UPDATE:

我在settings.py设置调试为True和现在我得到了django错误:

ViewDoesNotExist at/ 无法导入massivecoupon.engine.views。错误:没有模块名为库

+0

可能的复制:http://stackoverflow.com/questions/3281433/what-does-this-set-of-django-errors-mean/3281632#3281632 – eruciform 2010-07-21 02:36:52

+0

解决方案:http://stackoverflow.com/questions/ 5127109/Django的管理-cookie的问题上-MAC – zengr 2011-09-11 06:02:36

回答

7

快速回答:检查你的apache/tomcat的的access.log和error.log

接下来,我上面引述的其他(不是真的DUP)question可能是一个不同的情况,但我建议寻找到同样的事情:

Your PYTHONPATH may not contain your project directory, or your DJANGO_SETTINGS_MODULE may not contain 'mysite.website', at least from apache's point of view. Whatever user apache runs as for your website needs to have that set up for it, like in its .profile . Or if you're using mod_python , they need to be set up in the .htaccess or apache's httpd.conf . Or if you're using mod_wsgi , it needs to be in the wsgi setup file -- passenger_wsgi.py or the like -- whatever apache's module will be looking for.

下一页:

  • 检查,如果它需要访问的文件都可以访问由什么Apache运行你的Django站点
  • 确保你的数据库访问由用户
  • 和数据库设置/密码访问由用户
  • 确保您有SITE_ID=1设置
  • 确保你有一个现场记录添加到数据库中
0

首先检查Apache错误日志。如果Apache错误日志中没有任何内容,由于它在处理请求时是代码或Django的内部错误,请在Django站点设置文件中将DEBUG设置为True,并重新启动Apache,以便在浏览器中显示错误的详细信息。