G
Gandalf
Hi All!
Here is my server signature:
Apache/2.0.48 (Unix) PHP/4.3.4 mod_python/3.0.3 Python/2.3.3
mod_ssl/2.0.48 OpenSSL/0.9.7c Server at arwen.msnet Port 80
This is what I have in httpd.conf:
LoadModule python_module libexec/apache2/mod_python.so
AddHandler mod_python .py
AddType applcation/x-http-python .py
<Directory />
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
This is what I have in index.py (BTW it was taken from the mod_python
tutorial,
http://www.modpython.org/live/current/doc-html/tut-what-it-do.html ):
from mod_python import apache
def handler(req):
req.content_type = "text/plain"
req.write("Hello World!")
return apache.OK
Finally, the server starts OK, and when I try to GET this URL:
http://arwen.msnet/index.py?handler
then I get a plain/text file containing my Python code. It seems that
the handler does not work.
I tried to use this too:
PythonHandler index
but it did not work either. What did I wrong?
Thanks in advance,
G
Here is my server signature:
Apache/2.0.48 (Unix) PHP/4.3.4 mod_python/3.0.3 Python/2.3.3
mod_ssl/2.0.48 OpenSSL/0.9.7c Server at arwen.msnet Port 80
This is what I have in httpd.conf:
LoadModule python_module libexec/apache2/mod_python.so
AddHandler mod_python .py
AddType applcation/x-http-python .py
<Directory />
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
This is what I have in index.py (BTW it was taken from the mod_python
tutorial,
http://www.modpython.org/live/current/doc-html/tut-what-it-do.html ):
from mod_python import apache
def handler(req):
req.content_type = "text/plain"
req.write("Hello World!")
return apache.OK
Finally, the server starts OK, and when I try to GET this URL:
http://arwen.msnet/index.py?handler
then I get a plain/text file containing my Python code. It seems that
the handler does not work.
I tried to use this too:
PythonHandler index
but it did not work either. What did I wrong?
Thanks in advance,
G