Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have an Ubuntu 10.04 server that already has apache and wsgi working. I also have a python script that works just fine using the make_server command:

if __name__ == '__main__':
from wsgiref.simple_server import make_server
srv = make_server('', 8080, display_status)

Now I would like to have the page always active without having to run the script manually. I looked at what Moin is doing. I found these lines in apache2.conf:

WSGIScriptAlias /wiki /usr/local/share/moin/moin.wsgi
WSGIDaemonProcess moin user=www-data group=www-data processes=5 threads=10 maximum-requests=1000 umask=0007
WSGIProcessGroup moin

And moin.wsgi is as listed:

import sys, os

sys.path.insert(0, '/usr/local/share/moin')
from MoinMoin.web.serving import make_application
application = make_application(shared=True)

QUESTION: Can I create a similar section in apache2.conf pointing to another wsgi file? Like this:

WSGIScriptAlias /status /mypath/status.wsgi
WSGIDaemonProcess status user=www-data group=www-data processes=5 threads=10 maximum-requests=1000 umask=0007
WSGIProcessGroup status

And if so, what is required to convert my simple_server script into a daemonized process? Most of the information I find about wsgi is related to using it with frameworks like Django. I haven't found a simple howto detailing how to make this work.


share|improve this question
up vote 1 down vote accepted

Did you read any of the official mod_wsgi documentation?

share|improve this answer
Perfect. Exactly what I was looking for. Thanks, Graham. – jbbarnes Oct 24 '12 at 23:38

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.