title: Why is my Django installation delivering an empty HTTP response?
body: <p><strong>Final Update:</strong> There was a stray <code>LoadModule python_module modules/mod_python.so</code> that conflicted with <code>mod_wsgi</code>. Removing that LoadModule made everything work again.</p>
  
  <hr>
  
  <p>I am setting up a production server with Django and following along with <a href="http://docs.djangoproject.com/en/1.2/intro/tutorial01/" rel="nofollow noreferrer">the Django tutorial</a>, yet receiving a blank page (or, as Chrome likes to report, <code>Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.</code>) when I visit <code>http://domain.com/mysite</code>.</p>
  
  <pre><code># httpd.conf
  
  LoadModule wsgi_module modules/mod_wsgi.so
  WSGIScriptAlias /mysite /home/gibson/mysite/django.wsgi
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code># django.wsgi
  
  import os
  import sys
  
  sys.path.append('/home/gibson')
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
  
  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>I've also attempted using a very basic mod_wsgi test application (as found in the <a href="http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide" rel="nofollow noreferrer">mod_wsgi wiki</a>), which behaves as expected:</p>
  
  <pre><code># django.wsgi (test)
  
  def application(environ, start_response):
      status = '200 OK'
      output = 'i live!'
      response_headers = [('Content-type', 'text/plain'),
                          ('Content-Length', str(len(output)))]
      start_response(status, response_headers)
      return [output]
  </code></pre>
  
  <p>Is there something else I could be forgetting? I appreciate the insight.</p>
  
  <p><strong>small update:</strong> For giggles, I checked my Apache error_log:</p>
  
  <pre><code>[notice] child pid 18356 exit signal Segmentation fault (11)
  </code></pre>
  
  <p>Googling for this gem returned some stuff about Django's caching mechanism (which I don't use) and conflicts with loading the mod_python module (which I've commented out in my httpd.conf).</p>
  
  <p><strong>Update 2:</strong> (comments removed for brevity)</p>
  
  <pre><code># settings.py
  
  DEBUG = True
  TEMPLATE_DEBUG = DEBUG
  ADMINS = (
  )
  MANAGERS = ADMINS
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3', 
          'NAME': '/home/gibson/mysite/sqlite3.db',
          'USER': '',
          'PASSWORD': '',
          'HOST': '',
          'PORT': '',
      }
  }
  TIME_ZONE = 'America/Chicago'
  LANGUAGE_CODE = 'en-us'
  SITE_ID = 1
  USE_I18N = True
  USE_L10N = True
  MEDIA_ROOT = ''
  MEDIA_URL = ''
  ADMIN_MEDIA_PREFIX = '/media/'
  SECRET_KEY = '[redacted]'
  TEMPLATE_LOADERS = (
      'django.template.loaders.filesystem.Loader',
      'django.template.loaders.app_directories.Loader',
  )
  MIDDLEWARE_CLASSES = (
      'django.middleware.common.CommonMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
  )
  ROOT_URLCONF = 'mysite.urls'
  TEMPLATE_DIRS = (
  )
  
  INSTALLED_APPS = (
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.sites',
      'django.contrib.messages',
  )
  </code></pre>
  
  <p><br></p>
  
  <pre><code># urls.py
  
  from django.conf.urls.defaults import *
  urlpatterns = patterns('',)
  </code></pre>