503 Error: Service Temporarily Unavailable (Mod_wsgi, Apache, Django)

I followed the tutorial to mount a Djando application on Apache here.
The Django project was created under its own directory in /opt. Any suggestions or other tutorials I can use? I reviewed few tutorials on the Django site with no success. The application does not serve any static pages, just receives requests. However, we did setup a test file to check if the app is working in urls.py. I get a 404 error.


Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or > capacity problems. Please try again later.

Here is the current configuration is set: app.wsgi

import os, sys

sys.path.append('<PATH TO PYTHON INSTALL>/django')

os.environ['DJANGO_SETTINGS_MODULE'] = '<APPLICATION>.settings_production'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()
  • OS: CentOS
  • Python: 2.7
  • Framework: Django
  • Mod: MOD_WSGI
  • WebServer: Apache

Apache Entries:

LoadModule wsgi_module modules/mod_wsgi.so
AddHandler wsgi-script .wsgi

WSGIDaemonProcess server threads=25 display-name=%{GROUP}
WSGIProcessGroup server


<Directory /opt/<APPLICATION>>
  Order allow,deny
  Allow from all

Please let me know if I am missing anything or if I can supply any other data.

After further research I found the issue is with creating a socket as Apache may not have access to do so. I tried using the:

WSGISocketPrefix /tmp/wsgi

, but I receive a 500 Internal Error, thoughts?



Leave a Reply