How would i enable and execute python scripts on cPanel/WHM accounts?

link|improve this question

25% accept rate
wow, asked this 1 month ago!!!!!!!, no response!!! – Daniel Jul 23 '10 at 9:08
3 months ago. still no response :( – Daniel Oct 1 '10 at 9:18
feedback

1 Answer

You can download the mod_python here : wget http://archive.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz

Extract and configure the mod_python: ./configure --with-apxs=/usr/local/apache/bin/apxs make make install

Now you have to add the mod_python module to apache : Locate where is mod_python.so is and then add the module to apache config file (/usr/local/apache/conf/httpd.con) : LoadModule python_module libexec/mod_python.so

Restart apache and you

No you have finished with apache and you should configure the virtual host : go to /home/username/public_html and create a .htaccess file which containing:

AddHandler python-program .py PythonHandler testingpython PythonDebug On

link|improve this answer
This does not help because it does not explain how to add the module to apache without breaking the cpanel-generated files. – Evgeny Feb 22 at 15:29
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.