-------------------------------
/etc/apache2/mods-enabled/mod_python.load
-------------------------------
LoadModule python_module /usr/lib/apache2/modules/mod_python.so
-------------------------------
/etc/apache2/apache2.conf
-------------------------------
...
<Directory /var/www>
AllowOverride FileInfo
</Directory>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
...
<Location /mpinfo>
SetHandler mod_python
PythonHandler mod_python.testhandler
</Location>
AddHandler mod_python .psp
PythonHandler mod_python.psp
PythonDebug On
-------------------------------
/etc/apache2/apache2.conf
-------------------------------
<%
"""This is a Python Server Page test"""
#import x,y,z
%>
<html>
<head>
<title>This is a .PSP test</title>
</head>
<body>
Hello, all! This is a PSP file. No, this has nothing to do with the PSP (as in PlayStation Portable.) PSP, in this case, is "Python Server Page." Basically, it's a HTML page written in Python! Whoo! Anyways...I'll now print "Yay! This was written in Python" 100 more times for no reason at all:
<%
print "Yay! This was written in Python" * 100
%>
</body>
</html>