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:
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.
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.
- A domain added to your Grid
- Account Center access
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.
- To get started, 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.
- That will take you to your Grid Control Panel, shown below:
- Under "Server Settings", click on "PHP Settings".
- That will take you here:
- 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.
- Last but not least, click on "Save" at the bottom of the page to capture the settings.
That's it! FastCGI should now be enabled based on your selection(s).
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.
If the screenshots you see here don't match your version of Plesk, you may be running an older, "End of Life" version of the DV server. We strongly advise you to migrate to a DV server to take advantage of the up-to-date hardware and software this platform affords.
If you are on a DV 4.0 and are running Plesk 10.x, please see this article for upgrade information: How do I upgrade Plesk?
These screenshots are of the DV server 4.0 running Plesk 11. Your Plesk control panel may differ slightly.
- Log into the Plesk Control Panel for your domain. See Figure 1:
- Click on the Websites & Domains tab at the top.
- Scroll down to Show Advanced Operations and click.
- Click on Website Scripting and Security.
- This opens the Hosting Settings for your domain. Under Web Scripting and Statistics, you'll see PHP support (run as and a drop-down menu). The default is Apache module. Select FastCGI application and tick the box for FastCGI support.
- Click OK to save your settings. That's it! FastCGI is now enabled for your DV 4.0.