Graham Dumpleton
grahamd at dscpl.com.au
Mon May 9 18:03:32 EDT 2005
You are following the instructions for mod_python 3.1.X when you only have mod_python 2.7.X installed. Read: http://www.dscpl.com.au/projects/vampire/articles/modpython-001.html It will explain some of the differences. Graham Dianne Chen wrote .. > Hi all- > > I am new to mod_python and I am having problems > getting a simplest example to work. I have found > another earlier post in archives, but he was having > error message. I am getting no error message, but must > have simple mistake. Here are my facts: > > RHEL3.0 > Apache 2.0 > mod_python 2.7 (as installed) > python 2.2 (as installed) > Using python2.3 installed in /usr/local/bin for > running applications > > httpd.conf mods: > ===== > LoadModule python_module modules/mod_python.so > > <Directory /var/www/html/apachetest> > AddHandler mod_python .py > PythonHandler mptest > PythonDebug On > </Directory> > ===== > > I have created a link in /var/www/html directory > called "apachetest" which points to a directory > /usr/local/testdir. Testdir contains a file called > mptest.py. The contents of mptest.py are suggested > from docs: > ------- > from mod_python import apache > > def handler(req): > req.send_http_header() > req.write("Hello World!") > return apache.OK > -------- > > When I use following URL, I get a file listing - it > looks like apache has no idea that a .py file needs to > be executed and not just listed: > > http://my_server/apachetest/mptest.py > > Can anyone provide a pointer where I have gone wrong? > > Thanks! > DC > > > > > Yahoo! Mail > Stay connected, organized, and protected. Take the tour: > http://tour.mail.yahoo.com/mailtour.html > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|