Django Internal Server Error


Question

I'm new at this and stuck. What would cause Django to run without error when I do python manage.py runserver but then throw Internal Server Error when I try to access it through the web? I have another project giving the Congratulations on your first Django-powered page, and I got the same result with the same .wsgi file initially with this project.

It wasn't until I tried to install this script in massivecoupon project that I got Internal Server Error:

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

UPDATE:

I set Debug to True in settings.py and now I am getting the django error:

ViewDoesNotExist at / Could not import massivecoupon.engine.views. Error was: No module named libs

1
0
7/21/2010 10:53:20 PM

Quick answer: check your apache/tomcat access.log and error.log

Next, the other (not really dup) question I quoted above may be a different situation, but I recommend looking into the same things:

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.

Next:

  • check if the files it needs to access are accessible by what apache runs your django site as
  • make sure your database is accessible by that user
  • and that the database setup/password is accessible by that user
  • make sure you have SITE_ID=1 set
  • make sure that you have a site record added into the database
7
5/23/2017 12:01:15 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon