PDA

View Full Version : Python in cPanel/WHM



Rozanne
01-11-11, 11:46
Hi

I am using cPanel/WHM for my reseller hosting account and I wish to enable Python support to my clients, how to do this with cPanel/ WHM? As I don't have any experience with it. Somebody Help Me

jeremyc
01-11-11, 11:57
Hi

Would you try to install mod_Python or you are talking about Python through CGI? Python works very well on cPanel, as I've seen many people do it by installing mod_Python. So if you want to do it I'd recommend Mod_Python, which is an efficient method.

Thanx

Rozanne
01-11-11, 12:07
Hi

Can I install mod_Python through easyapache? Smoke

~Phil~
01-11-11, 12:10
Python should be installed on your cPanel server, this is so because yum needs it . So you just have to add handler for Python, as it is not created by default.

All you have to do is to edit "/etc/httpd/conf/httpd.conf" and change the following line from

AddHandler cgi-script .cgi .pl

to

AddHandler cgi-script .cgi .pl .py

Now, change the permissions on any Python script files to 755 if you have not done so already. The Python script files should now be executed if you call them from a browser..

This worked for me..

jeremyc
01-11-11, 12:13
Hi

To install mod_python, I'd recommend you to do it through a custom easyapache module to include mod_python support to easyapache. However, there is a custom module also available, but it has no support so it is for use at your personal risk.

Thanx