Overview
Running PHP as FastCGI can increase the performance of websites significantly; in some cases, a site can run up to six times as fast than when running PHP as an Apache module. This article will explain how to configure a domain on your server to run PHP as FastCGI. For more information about FastCGI, please see their website:
NOTE:
Any domains added to the Grid after August 1, 2013 will have FastCGI enabled by default. If your domain was configured prior to August 1, 2013, you may enable FastCGI using the instructions below.
Another reason to run PHP as FastCGI is to allow PHP to run as your domain/FTP user rather than as the Apache user. Because of the ownership that Plesk assigns to your website files and directories, Apache does not have permission to write to your web directories by default. This can cause permission errors in some applications - for example, a PHP upload script.
Requirements
Please replace example.com in the examples with your own domain, and domainuser with your own domain/FTP user that you set up in Plesk.
Requirements
- A domain added to your Grid
- Account Center access
Instructions
TIP:
Certain applications, such as specific configurations of ExpressionEngine, may not work with the FastCGI configuration being used on the Grid. For example, enabling FastCGI will cause the mod_rewrite path_info variable to stop functioning. This affects custom configurations of some CMS software. As such, FastCGI is not advised if you are running web applications with path_info rewrite requirements. (This does not affect WordPress, Joomla, or similar CMS platforms.) If your application exhibits erratic behavior once FastCGI is engaged, we advise disabling it for that particular domain.
- Log into the (mt) Media Temple Account Center at https://ac.mediatemple.net.
- Once logged in, you will see your account "Overview". Click on the ADMIN button for your Grid.
- Under Server Settings, click on PHP Settings.
- You can use the first drop-down menu to set all of your domains to FastCGI if you would like.
Or, you can scroll down further to change settings on a per-domain basis. - Click the Save at the bottom of the page to capture the settings.
That's it! FastCGI should now be enabled based on your selection(s).
Instructions
Following these instructions will configure your domain to run PHP as FastCGI, with the user and group that Plesk uses for your domain site files. Plesk versions 12.* have PHP-FPM enabled by default. Please note that FPM is similar to FastCGI and you may not need to change these settings.
1. Log in to your Plesk control panel and selects Domains from the menu on the left. Then select the domain that you would like to manage.
2. From the new menu select PHP Settings.
3. In the PHP support menu, make sure that the PHP support box is checked and select FastCGI served by Apache from the drop down menu.
4. Scroll to the bottom of the page and select apply. Your PHP handler will not update until you do this. Once you've done this, use the View the phpinfo() page link to verify your changes.
Comments