Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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/
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?


share|improve this question
What are you seeing when you visit your webpage? Blank page, <% sometag %>? Also try setting DEBUG=true in your settings file to see if you can a more descriptive error. – Pratik Amin Mar 23 '11 at 16:49
I get a 404 Page. Thanks – thinkux Mar 23 '11 at 17:18

I had the same problem (Service Temporarily Unavailable).
I found the solution here: At line 373.

echo "WSGISocketPrefix run/wsgi" >> /etc/httpd/conf.d/wsgi.conf
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.