How to change PHP Server API to Apache 2.0 Handler from CGI/FastCGI?

Neeraj Kumar picture Neeraj Kumar · Feb 3, 2015 · Viewed 11.9k times · Source

I have a Plesk 12 server in which PHP is running with Server API CGI/FastCGI. But some of my script requirements I have to change it to Apache 2.0 Handler.

I have performed several changes in Apache configs to enable Apache 2.0 Handler but not successful.

Please help me out of this.

Answer

websky picture websky · Feb 5, 2015

Edit /etc/httpd/conf/httpd.conf

####    PHP as fast cgi
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php.fcgi
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

Restart the apache
 /etc/init.d/httpd restart