[python-win32] Hello World Problem :: Apache/2.0.48 (Win32)
mod_python/3.0.4 Python/2.3
python-forums at claytonbrown.net
python-forums at claytonbrown.net
Fri Dec 12 20:15:38 EST 2003
Hi I am trying to teach myself a bit of mod_python + apache2.0 as I've
not worked with either as yet
However the 'hello world' is not exactly what I was hoping for
In the example:
http://www.modpython.org/live/current/doc-html/inst-testing.html
Can anyone point me in the right direction, as far as I can see it all
looks good, apache starts without any errors was config and install is
all OK, the "Apache/2.0.48 (Win32) mod_python/3.0.4 Python/2.3 Server at
localhost Port 8080" footer kinda implies everything is groovy, however
it's not really doing the hello world part...
Could it be absolute paths need to be specified && perhps in local OS
form in the <Directory c:\folder\folder\folder> ??
Therefore the request is not being handed to mod_python as not a
directory configured for this behaviour?
Further detail:
httpd.conf:
------------------------------------------------------------------------
------------
Added:
LoadModule python_module modules/mod_python.so
Changed:
#<Directory />
# Options FollowSymLinks
# AllowOverride None
#</Directory>
To:
#CB :: Test MOD-ython-Directive
<Directory /htdocs/test>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
</Directory>
Mptest.py
----------------
from mod_python import apache
def handler(req):
req.write("Hello World!")
return apache.OK
OUTPUT: (http://localhost:8080/test/)
------------------------------------------------------------------------
------------
Index of /test
Name Last modified Size Description Parent
Directory -
mptest.py 13-Dec-2003 00:48 103
Apache/2.0.48 (Win32) mod_python/3.0.4 Python/2.3 Server at localhost
Port 8080
More information about the Python-win32
mailing list