Differences between revisions 1 and 2
Revision 1 as of 2013-05-10 14:40:33
Size: 1123
Editor: thumbs
Comment:
Revision 2 as of 2013-05-10 14:43:48
Size: 1191
Editor: thumbs
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:

Thanks to Guillaume Seigneuret for the kickstart on that recipe!

The scope of this article is to discuss the possible configurations with Apache httpd 2.2 and php. Using mod_php in most cases is not a viable solution, since it introduces scalability issues with the added RAM requirement for each httpd process. Additionally, it precludes the use of threaded MPMs since php extensions are not thread-safe in many cases.

The ideal configuration is a light threaded httpd process that communicates with an external fastcgi server, such as PHP-FPM.

The first recipe uses mod_fastcgi:

  • Alias /php5.fcgi /var/www/fcgi/php5.fcgi
    FastCGIExternalServer /var/www/fcgi/php5.fcgi -flush -host 127.0.0.1:9000

    # Invent a new handler name and use it for PHP files
    AddHandler my-fastcgi .php

    # Requests for *.php are actually fed to php-fastcgi as an argument
    Action my-fastcgi /php5.fcgi

    <Directory “/var/www/fcgi/">
      Order deny,allow
      Deny from all
      <Files "php5.fcgi">
        Order allow,deny
        Allow from all
      </Files>
    </Directory>

Thanks to Guillaume Seigneuret for the kickstart on that recipe!

php-fastcgi (last edited 2014-03-15 00:05:52 by thumbs)