ocf/puppet — pull request #3 by chriskuehl (2014-10-15 18:14:58+00:00)
Title: Switch from mod_fcgid to mod_fastcgi

Using mod_fastcgi allows us to use tha "autoRestart" option to automatically restart a FastCGI process when the mtime of the script is updated (i.e. when touching the script).

Note that this requires a change to the vhost config files, which currently use FcgidWrapper to define a specific wrapper for php scripts. Instead, we can now use the actions module to use a specific FastCGI wrapper for .php files for virtual hosts.

Virtual hosts are special because they each get their own FastCGI PHP wrapper; we want to use this wrapper so that vhosts get improved PHP performance (can benefit from APC, etc.).

We need to enable mod_actions because of the switch to mod_fastcgi, which, unlike mod_fcgid, doesn't support defining a wrapper script for only files of a certain suffix. So, instead, we add to each vhost:

AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /opt/suexec/$login/php5-fcgi-wrapper

...which achieves the same thing.

See [this commit](https://github.com/ocf/utils/commit/bd03c0d8b830e5544300ebc3837306c6d17eb87d) (not yet merged) in the utils repo for the change to vhost definitions.

This is currently live on dev-death; you can try some test URLs:
* https://dev-www.ocf.berkeley.edu/~ckuehl/
* http://dev-dev-vhost.ocf.berkeley.edu/

This change will require some manual fiddling on death after merging. I'll probably merge and deploy it later this afternoon if nobody objects before then.