Graham Dumpleton
grahamd at dscpl.com.au
Tue Oct 18 16:56:07 EDT 2005
As well as following Jorey's suggestion on a publisher example, also try the most basic mptest.py example as described in: http://www.dscpl.com.au/articles/modpython-001.html This article gives points about what not to do and where to look to resolve issues. Jorey Bump wrote .. > Philippe C. Martin wrote: > > > I also noticed that the localhost/mp pages shows "Apache/2.0.55 (Unix) > > mod_python/3.2.0b Python/2.4.2 Server at 127.0.0.1 Port 80" at the bottom. > > Okay, then mod_python is loaded and running. I think your test is > flawed, however. Try something simpler: > > <Directory "/var/www/html/mp"> > SetHandler python-program > PythonHandler mod_python.publisher > PythonDebug On > </Directory> > > Create /var/www/html/mp/hello.py: > > def world(): > return "Hello, world!" > > Restart apache and point a browser at: > > http://localhost/mp/hello/world > > SetHandler causes mod_python to handle *all* files in the directory, and > allows you to leave off the .py extension. Publisher requires you to > point the URL at a function within the module. AddHandler lets you mix > files, but you must call the module with the .py extension. > > When using SetHandler, you can create a file named index.py with a > function named index, and leave both off the URL. This has historically > caused some problems that 3.2b claims to address. I've haven't checked > this myself, but try it next if you really want to use only the > directory in the URL with a default module/function. > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|