Jorey Bump
list at joreybump.com
Mon Nov 15 17:50:48 EST 2004
Victor Ng wrote: > There's really not much to it is there? I just did the usual > configure; make; make install > > $ ./configure --with-apxs=/sw/sbin/apxs --with-python=/sw/bin/python > $ make clean; make; sudo make install > > I added : > > LoadModule python_module /sw/lib/apache2/modules/mod_python.so > > to my httpd.conf file for Apache2, then I added the couple lines of > config to run the mptest.py script. > > >>> 1123 <Directory /Users/victorng/Sites> >>> 1124 AddHandler mod_python .py >>> 1125 PythonHandler mod_python.publisher >>> 1126 PythonDebug On >>> 1127 </Directory> > > > Did I miss something? You seem to be mixing up your examples. To test publisher, try something like this: <Directory /var/www/documentroot> AddHandler python-program .py PythonHandler mod_python.publisher PythonDebug On </Directory> Create test.py: def hello(req): x = "Hello, world!" return x Restart apache (if you modified httpd.conf), point your browser to: http://localhost/test.py/hello and see if that works.
|