mod python: What to use for PythonHandler in apache2.conf?
I'm trying to get apache2's modpython working. I've installed mod_python & added the following lines to my apache2.conf:
AddHandler mod_python .py
Is this correct? What is mod_python.publisher? How do I know if I have it?
If I look at my apache2 error log, I see these lines every time I try to access the python script through a browser:
[Wed Oct 11 18:59:36 2006] [notice] mod_python: (Re)importing module 'mod_python.publisher'
[Wed Oct 11 18:59:36 2006] [notice] mod_python: (Re)importing module 'example1' with path set to '['/job/drqueue/python/examples ']'
... and then the page comes up as a 404. ??
if anyone else comes across this same problem, here's the deal:
the above is correct - kindof.
It assumes there's some built-in python module called "publisher". As of the mod_python I just built v3.3.1, that doesn't exist. There is, however, a built-in called "testhandler" that will spit back a lot of python info, kinda like phpinfo() in php if you're familiar. Otherwise, you can just enter in the name of your script (minus the .py) to test.
So, if you make a hello world mod_python program called "hello.py" in /local/htdocs/python, the test config for apache would look like:
|All times are GMT -5. The time now is 10:49 PM.|