Running php as fastcgi has a reputation for using less server resources (specifically memory) that makes it attractive when memory starts to run low. Once the general setup of fastcgi is done enabling Drupal to run with it under Apache is as simple as adding 'ExecCGI' to the Options for a particular in either htaccess, the vhost file or elsewhere in the global Apache config.
When it comes to installing Aegir, simply adding ExecCGI to Aegir's default vhost during setup works fine.
<Directory /var/aegir/drupal-6.14>
Options Indexes FollowSymLinks MultiViews ExecCGI
{etc...}But that won't affect any of the platforms Aegir creates, nor can platforms inherit global Options since they each have their own config file with Options declared without +/-, erasing any previously declared Options.
Aegir platform config files are derived from /var/aegir/.drush/provision/web_server/provision_apache_platform.tpl.php, adding ExecCGI to that as with the main aegir vhost fixes the platforms created with aegir:
<Directory <?php print $publish_path; ?>>
Options Indexes FollowSymLinks MultiViews ExecCGISo far, so good. Aegir now works happily under fastcgi on this server. But further down the line when Aegir can be used to deploy/import sites to/from other servers what happens? What happens when one is running fastcgi, but the other is using mod_php? Will it need a UI option in Aegir? Where would that leave drush? This makes my head hurt, not knowing much about Aegir internals.
I can't help thinking that it could be greatly simplified if aegir stopped adding outright Options declarations and instead only modified a global Options config where necessary. Whether the global Options should be declared per Apache server, or per Aegir install I'm not sure. The latter at least allows Aegir to keep tight control over the Options available to files it oversees, whereas the former turns security over to the server maintainer...
I envision creating a global config file, say /var/aegir/config/vhost.d/global.conf, with contents something like:
<Directory /var/aegir/platforms>
# default - for Apache with mod_php
Options Indexes FollowSymLinks MultiViews
# fastcgi - uncomment the line below and comment out the line above if using php as cgi
#Options Indexes FollowSymLinks MultiViews ExecCGI
</Directory>And only adding or subtracting from this 'array' of Options by using + or - prefixed options in the per platform vhosts eg for sites/sitename/files directory:
Options -Indexes -ExecCGIAnd if you haven't got a clue what I'm talking about go read the Apache docs regarding the Options directive and describing the difference between:
Options Indexes Multiviewsand
Options +Indexes +Multiviews;) Here's the link http://httpd.apache.org/docs/2.2/mod/core.html#options
I can work on a patch if everyone thinks this is a sane approach.
