Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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've installed the mod_fastcgi on my Apache and put LoadModule into my httpd.conf file. When I do a phpinfo(), mod_fastcgi is in the loaded modules section, but the server API still shows up as Apache 2.0. Please let me know how to change this.

share|improve this question

migrated from Mar 12 '11 at 23:55

This question came from our site for professional and enthusiast programmers.

Also see – Pacerier Jun 25 '15 at 5:26

Do the steps below:

  • Disable the php.conf file that is configured to run as Apache module:
    # mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.module
  • Create the php.fcgi file in /var/www/cgi-bin with something like this:
    exec $PHP_CGI
  • Modify the DocumentRoot or VirtualHost section to add the AddHandler and Action directive:
    AddHandler php5-fastcgi .php
    Action php5-fastcgi /cgi-bin/php.fcgi

Testing with phpinfo():

# lynx -dump http://localhost/info.php | grep 'Server API'
   Server API CGI/FastCGI
share|improve this answer
Does this mean a server can only serve up mod_php or fastcgi, but not both? Or is there a way to run both? – Jason Oct 12 '15 at 18:36

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.