Install Python on Apache
Gerhard Häring
gerhard.nospam at bigfoot.de
Fri Mar 23 21:10:47 EST 2001
No need for weird and ugly hacks like the ones mentioned before 8-)
Just add this *one* line at the end of your httpd.conf:
ScriptInterpreterSource Registry
Assuming .py, .pyc, .pyw and .pyo are registered to be handled by
python{w}.exe, like any installer from ActiveState or python.org does,
you are ready to go. Just give your cgi-scripts an extension registered
to Python. My scripts look like this:
#!/usr/bin/env python
print 'Content-type: text/plain\n\nPython cgi works!'
They then run unchanged on win32 and Unix.
Gerhard
PS: The ScriptInterpreterSource is mentioned in the Apache docs. It just
makes Apache use the Windows assosiations of the various extensions to
invoke the right interpreter for cgi, such as .pl for P*rl, .py for
Python, .bat and .cmd for batch files, etc.
--
Sorry for the fake email, please use the real one below to reply.
contact: g e r h a r d @ b i g f o o t . d e
web: http://highqualdev.com
More information about the Python-list
mailing list