Chris Curvey
ccurvey at earthlink.net
Wed Mar 31 08:47:08 EST 2004
Two thoughts: 1) What url are you going after? If you're going to http://localhost/mptest, then getting an index of the files makes some sense. What happens if you go after http://localhost/mptest/mptest.py ? 2) My httpd.conf is a little different. it looks like this: Alias /hmp/ "/home/chris/hoops/mp/mp/web/" <Directory /home/chris/hoops/mp/mp/web> AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On </Directory> Let us know how it turns out! -Chris jakob at simon-gaarde.dk wrote: >I can't get the python interpreter running through apache. Apache seems to >totally ignore the existance of mod_python. First i started by following >the instructions found at: >http://www.modpython.org/live/current/doc-html/inst-testing.html >The result was the same as it is now after poking around in the >Directory-section I have created: > >------------------------------------ >Index of /mptest > > Name Last modified Size Description Parent >Directory - > mptest.py 31-Mar-2004 09:56 95 > >Apache/2.0.49 (Unix) mod_python/3.1.3 Python/2.3.2 Server at 127.0.0.1 >Port 80 >------------------------------------ > >As you see it just lists the files in the directory :( > >I have compiled apache 2.0.49 (newest right now), and mod_python 3.1.3 >(also the newest). >Currently my alterations to the httpd.conf file (which by the way are the >only alterations I have made) are: > >In the Global Environment section: >--------------------------------- >LoadModule python_module /usr/modules/mod_python.so >--------------------------------- > >In the Main Server Configuration: >--------------------------------- >Alias /mptest/ /usr/htdocs/test/ > ><Directory /mptest> > AllowOverride FileInfo > AddHandler python-program .py > PythonHandler mptest > PythonDebug On ></Directory> >--------------------------------- > >mptest.py: >--------------------------------- >jsg-lap:/usr/htdocs/test# cat mptest.py >from mod_python import apache > >def handler(req): > req.write("Hello World!") > return apache.OK >--------------------------------- > >Here is the output of apache when entering the directory >--------------------------------- >jsg-lap:/usr/logs# cat access_log >127.0.0.1 - - [31/Mar/2004:14:20:58 +0200] "GET /mptest/ HTTP/1.1" 200 691 >127.0.0.1 - - [31/Mar/2004:14:20:58 +0200] "GET /icons/blank.gif HTTP/1.1" >304 - >127.0.0.1 - - [31/Mar/2004:14:20:58 +0200] "GET /icons/back.gif HTTP/1.1" >304 - >127.0.0.1 - - [31/Mar/2004:14:20:58 +0200] "GET /icons/p.gif HTTP/1.1" 304 - >jsg-lap:/usr/logs# cat error_log >[Wed Mar 31 14:20:49 2004] [notice] mod_python: Creating 32 session >mutexes based on 150 max processes and 0 max threads. >[Wed Mar 31 14:20:49 2004] [notice] Apache/2.0.49 (Unix) mod_python/3.1.3 >Python/2.3.2 configured -- resuming normal operations >--------------------------------- > >System: >Xandros Deluxe 2.0 (debian based linux distribution) > >Whats wrong I have wasted hours getting nowhere :( Please help... > >Best regards >Jakob Simon-Gaarde >_______________________________________________ >Mod_python mailing list >Mod_python at modpython.org >http://mailman.modpython.org/mailman/listinfo/mod_python > > >
|