- install mod_python
#yum install mod_python
- backup original config file
#cp /etc/httpd/conf.d/python.conf /etc/httpd/conf.d/python.conf_orig
- edit config file
#vi /etc/httpd/conf.d/python.conf
LoadModule python_module modules/mod_python.so <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all AddHandler mod_python .psp PythonHandler mod_python.psp PythonDebug On </Directory> |
- restart apache
#/etc/init.d/httpd restart
- create sample file
#vi /var/www/html/test.psp
<html>
<body>
<h1><% req.write("Hello!") %></h1>
</body>
</html>