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'm attempting to tweak my server but I don't understand what the definition of "python-program" is in a site configuration file. And by that, I understand it's some sort of reference to python.

What I mean, where is it defined? Which version does that lead too and where is that variable (if that is what it is) introduced? Is it built in to Apache 2?

To ensure I'm clear, I see it in this context...

<Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonDebug Off
    PythonPath "['/main-data/www/mysite'] + sys.path
share|improve this question
up vote 1 down vote accepted

That's part of mod_python. The <Location> block you have tells Apache to pass all requests to mod_python, which will handle them according them to the PythonHandler setting (which is a module that will be found somewhere in PythonPath).

Presumably you're either loading mod_python via a LoadModule directive somewhere in your Apache configuration or it's compiled in statically (the former is far more likely...I don't even know if mod_python supports the non-module option).

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.