How to install and integrate mod_wsgi in cpanel server
Posted: Fri Aug 31, 2012 11:47 am
First i would suggest you to install python 2.7
Follow the steps below to install python 2.7.X
Follow the steps below to install python 2.7.X
Download Python latest from the website below. For Python2.7 use the link :cd /usr/local/src
Code: Select all
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
Now to install python 2.7tar -xzvf Python-2.7.3.tgz
It’s important that you build Python with shared libraries enabled, since mod_wsgi will need them.cd Python-2.7.3
You’ll get a new build of python in /usr/local/bin, without disrupting the native version in /usr/bin. Any user wanting python2.7 to be their default can add this to their .bash_profile:./configure --enable-shared
make install
PATH=/usr/local/bin:$PATH:$HOME/bin
Now you can use the link below to download "custom_opt_mod-mod_wsgi.tar.gz"cd /etc/ld.so.conf.d
echo "/usr/local/lib/" > python27.conf
ldconfig
cd /usr/local/src
OR
Now you can runtar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_wsgi.tar.gz
You should see that in the first apache conf screen "MOD WSGI"/scripts/easyapache