cd /home/user/public-html/cgi-bin
cp /usr/local/lib/php.ini /home/user/public_html/cgi-bin
nano php.ini
nano php.fcgi
#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5
chmod +x /home/user/public_html/cgi-bin/php.fcgi
chown -R user:user /home/user/public_html/cgi-bin/
nano  /home/user/public_html/.htaccess
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php.fcgi

then open
/usr/local/apache/conf/customconf.conf

nano /usr/local/apache/conf/customconf.conf

put the following inside it

Action php5-fastcgi /cgi-bin/php.fcgi
AddType application/x-httpd-php .php

after that include that file into apache configuration

include "/usr/local/apache/conf/customconf.conf"

then run the distiller to distill and save the current configuration of include file into cpanel apache template

/usr/local/cpanel/bin/apache_conf_distiller --update

Then rebuild the Apache configuration to make sure every things are correctly configured and the apache configruation httpd.conf could be rebuilt from the apache template file

/scripts/rebuildhttpdconf

You Are done
Thanks
Woshka Niknam

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.