Successful installation of mod_python on Apache on Win2k?
rolfedh at hotmail.com
Fri Sep 26 22:31:23 CEST 2003
> From: Rolfe Dlugy-Hegwer [mailto:RDlugyHegwer at symmetricom dot com]
> Sent: Thursday, September 25, 2003 7:53 PM
> To: 'sholden at holdenweb dot com'
> Subject: mod_python on Win2k question
> Hi Steve,
> I saw your thread on comp.lang.python: "I'm interested in installing
> mod_python in two environments:1. Wind2000/Apache2"
> Any joy getting mod_python to run on Win2k?
Oh, yes. To quote Stanley Unwin (of whom you've probably never heard)
"Deep joy in the fundimole".
> I 1)downloaded fresh versions of apache and mod python, 2)made default
> installations, 3)followed additional configuration
> instructions for mod
> python, 4) followed the tests recommended by mod_python
> documentation, 5)
OK, well I [...] just downloaded the installer. I
had Python 2.2 installed, and I decided not to push the envelope by
recompiling for 2.3 (which I also had installed). I also chose the
somewhat older 3.0 mod_python, and then bolted the session and cookie
stuff on from the 3.1 alpha mod_python, which seems to work after a bit
of grotesque hacking an d one bug removal.
> consulted the mod_python FAQ
> and I can't get it to work. My browser displays the .py file
> as text instead
> of running it as a script.
It's probably the directory characteristics that need to change. If you
plan to use the publisher interface (probably about the most general
thing to do), you need to bear two things in mind:
1. Mod_python doesn't play well in script-aliased directories, so don't
try using your cgi-bin directory for mod_python scripts.
2. You'll need an .htaccess file that reads something like [ferkles in
/Inetpub/wwwroot/modpython ...] this:
AddHandler python-program .py
Actually you don't need the DirectoryIndex line, and obviously you can
set up equivalent <Directory> lines in httpd.conf instread if you want.
> I'm going find someone who has succeeded and will write up
> instructions for
> the mod_python FAQ and for comp.lang.python.
I'm sure that would be very useful. Let me know if this has helped! [...] ;-)
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
Interview with GvR August 14, 2003 http://www.onlamp.com/python/
More information about the Python-list