title: Deploying Django project on Apache using Mod_wsgi
body: <p>I am deploying a Django project on Apache. and after configuration, I open the "localhost" in the browser, and nothing showed up and the status bar just keep saying "Waiting for localhost". Here is some info.</p>
  
  <p>1.Environment: </p>
  
  <pre><code>OS: Red Hat Enterprise Linux Server x86
  Python: 2.7.2
  Django: 1.3.1
  Mod_wsgi: 3.3
  Apache: 2.2.21
  Django project: /var/www/html/server/video1
  </code></pre>
  
  <p>2.Apache Config file lines added:</p>
  
  <pre><code>LoadModule wsgi_module modules/mod_wsgi.so
  WSGIScriptAlias / /var/www/html/server/video1/apache/django.wsgi
  
  Alias /media/ /usr/local/apache2/htdocs/media/
  Alias /static/ /usr/local/apache2/htdocs/static/
  
  &lt;Directory "/var/www/html/server/video"&gt;
  Order Deny,Allow
  Allow from all
  &lt;/Directory&gt;
  &lt;Directory "/usr/local/apache2/htdocs/media"&gt;
  Order Deny,Allow
  Allow from all
  &lt;/Directory&gt;
  &lt;Directory "/usr/local/apache2/htdocs/static"&gt;
  Order Deny,Allow
  Allow from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p>3.Django.wsgi file:</p>
  
  <pre><code>import os
  import os.path
  import sys
  
  sys.path.append('/var/www/html/server')
  sys.path.append('/var/www/html/server/video')
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'video1.settings'
  
  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()   
  </code></pre>
  
  <p>4.settings.py lines added:</p>
  
  <pre><code>MEDIA_ROOT='/usr/local/apache2/htdocs/media/'
  MEDIA_URL='/media/'
  STATIC_ROOT='/usr/local/apache2/htdocs/static/'
  STATIC_URL='/static/'
  ADMIN_MEDIA_PREFIX='static/admin'
  
  TEMPLATES_DIR = {
     "/var/www/html/server/video1/templates"
  }
  
  INSTALLED_APPS = {
     'django.contrib.admin'
  }
  </code></pre>
  
  <p>5.restart apache</p>
  
  <p>These are what I did, can someone help me to see if somewhere is wrong?</p>
  
  <p>Thank you very much</p>