Confusion: VPS: mod_php & FastCGI


I’m confused about whether my VPS is using mod_php or FastCGI.

  1. In the VPS Panel, under Domains you can check the option to disable mod_php.
    Mine is unchecked. So I assume this mean I AM using mod_php.

  2. Under the specific domain configuration I can set the PHP Mode. Here I have it set to 5.4FastCGI.

From my understanding, you run PHP under one or the other.

My phpinfo() shows FastCGI:

My httpd.conf shows (both?):

<IfModule mod_php5.c> php_admin_value open_basedir /dh/web/phpmyadmin:/tmp:/usr/local/lib/php:/home/xxx:/home/xxx </IfModule> Action php-cgi /cgi-system/php.cgi Action php5-cgi /cgi-system/php54.cgi

Am I running both? Does one override the other?

Thanks for any help!!

You’re using FastCGI. mod_php is no longer available as an option; the checkbox to disable it only applies to some older VPSes and dedicated servers, and will be removed in the near future.

Well, that’s too bad. But, it sure clears up the confusion, thanks!!

So, if I checked off the disable mod_php on the domain, you’re saying nothing would change then right?

I guess I’m just wondering if it’s possible that they’re both turned on (even though the plan is to get rid of mod_php, maybe it’s left in the config and on?), and that’s causing any issues (which I have, but that’s a whole other thread :slight_smile: ).

The “disable mod_php” checkbox in your server’s configuration is a historical leftover. It doesn’t do anything for your VPS, or any other server that is running Ubuntu.

Excellent Andrew, thanks for the confirmation.

Another question (for you or others) surrounding PHP versions and FastCGI while we’re here.

On the VPS I have 2 domains, and 1 of those has a few sub-domains. They all seem to have different set-ups with PHP versions and Users. So something like this:

psXXXXXX PHP54 FastCGI User A PHP56 FastCGI User B PHP54 FastCGI User C PHP54 CGI User D


  1. can this cause problems, running different versions of PHP on the same server (the 2 domains are on the same PS server right? Just with different “sections”?), or using FastCGI and CGI on the same server?

  2. I assume the total memory available for the server (we’re paying for 1GB now) is for all of these domains, and subdomains on the VPS?

  3. So, they then all share the same Apache server instance (and its config), or? I guess I’m confused at how they all live together :slight_smile:

Nope. This is all totally kosher, and should work just fine. :slight_smile:


Correct, they all run from the same web server instance.

The block for each domain in the web server configuration defines what PHP interpreter should be used for that virtual host, and how it should be launched (e.g, CGI or FastCGI). An important part of this is the “Action” directives you saw in your original post, which map action names like “php5-script” to the appropriate interpreter.

Great, thanks for the clarity Andrew!

The only good side to this recent crisis has been my new deeper knowledge in the LA of the LAMP stack…