Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
</Location>
share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.