0

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>

1 Answer 1

1

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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .