This article applies to enabling FastCGI support for PHP scripts on MediaTemple hosting.
Following sequence of commands/actions as mentioned below. Order is important!
Create a file with name “info.php” on your domains webroot directory – example path:** “/var/www/vhosts/example.com/”**
Add following codes in it.** **
<?php phpinfo(); ?>
After saving file like above access URL from browser: http://example.com/info.php
In output, look for option Server API **and its value. It must be **”CGI/FastCGI”.
In following screenshot, originally taken from a domain on MediaTemple account you can see below Server API is set to “Apache 2.0 Handler”
** **
For domain in question, make sure following options are configures:
See following screenshot for reference:
cd /var/www/vhosts/example.com
cp /usr/bin/php-cgi bin/
chown -R username:psacln bin
(replace username with your FTP login name for this domain)
vi conf/vhost.conf
AddHandler fcgid-script .php .php5
<Directory /var/www/vhosts/example.com/httpdocs>
FCGIWrapper /var/www/vhosts/example.com/bin/php-cgi .php
allow from all
</Directory>
/usr/local/psa/admin/sbin/websrvmng -a -v
cd httpdocs #DO NOT FORGET THIS COMMAND ELSE YOU WILL CRY FOR SURE
chown -R username:psacln *
(replace username with your FTP login name for this domain)