Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a CentOS server with Virtualmin on it. I have configured PHP the way I want it, using Apache mod_fastcgi. However, when I click "Re-check Config" in Virtualmin, I get

PHP execution via fcgid requires the Apache mod_fcgid module

This post says to change Default PHP execution mode to CGI, but I can't find such an option anywhere!

share|improve this question

mod_fastcgi ( is a 3rd-party module whose directives have a "FastCgi" prefix.

mod_fcgid is an Apache module whose directives have a "Fcgid" prefix.

I advise that you remove mod_fastcgi and go with mod_fcgid.

That's great news for PHP, because then you can dump apache mpm-prefork and go with the better mpm-worker, by not installing mod_php, instead use php as fast cgi. For debian, this means:

• Remove apache2-mpm-prefork and libapache2-mod-php5.

• Add apache2-mpm-worker, libapache2-mod-fcgid, and php5-cgi. With php5-cgi, you don't need a custom fast cgi wrapper, you can use the php command-line itself directly (notice the /usr/lib/cgi-bin/php5) below.

• For mod_fcgid with PHP, note that PHP as FastCGI has its own facility for terminating after handling so many requests (see PHP_FCGI_MAX_REQUESTS). FcgidMaxRequestsPerProcess helps avoid sending additional requests to the wrapper application after it has handled its limit.

• Inside each virtual host or at global scope:

    FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 200
    FcgidMaxRequestsPerProcess 200

• Then inside Directory:

    AddHandler fcgid-script .php
    FcgidWrapper /usr/lib/cgi-bin/php5 .php
    Options +ExecCGI
share|improve this answer
I'm using Apache mpm_worker. The issue is that I want mod_fastcgi and Virtualmin wants mod_fcgid. I have FastCGI working perfectly and don't want to switch it. The question was, how can I make Virtualmin run without installing mod_fcgid? – Josh May 1 '10 at 21:29
up vote 0 down vote accepted

For now, I solved it by enabling mod_fcgid in Apache but just not configuring it. But that's wasting memory, and I'd love to know the "proper" way to solve this!

share|improve this answer
UG. This solution is causing all sorts of other issues with the newest version of Virtualmin... – Josh May 7 '10 at 18:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.