running php outside of cgi

Simply for performance. Can you guys implement this and stil keep it secure? Running it as a cgi introduces a performance hit which is the reason so many folks are using things like php, ruby…etc etc.

Hey William,

We’ve begun the move to mod_fcgid, which will solve this problem for the vast majority of scripts (PHP runs unmodified under fcgid, Ruby on Rails apps generally run under it fine, and most popular/modern Perl scripts do too).

Virtualmin already has all of the support in place, but not all platforms have the required software in the repository. It also doesn’t cover all script types yet–it’s not safe to assume that all apps in any language other than PHP can use the FastCGI interface, so we’re figuring out how to do it on a per-script basis as we go along.

If you’re on any of the recent Fedoras, RHEL 4, CentOS 4, or Ubuntu, I believe you can use those features now. (It also, incidentally, allows use of PHP4 and PHP5 simultaneously in the same Apache.)

For Fedora and RHEL/CentOS:

yum install mod_fcgid

And optionally install the PHP version that didn’t come stock with your system, if you want to be able to run all PHP scripts.

For Ubuntu:

apt-get install libapache2-mod-fcgid

It also has both PHP versions available for install from the Universe repository.

Finally, you can switch Virtualmin’s “Default PHP exection mode” in the Apache website section of your Server Template(s) to “FCGId (run as virtual server owner)”.

For existing domains, select the domain and browse to "Server configuration" "Website options" and select: "FCGId (run as virtual server owner)" in the PHP scripts section.