Using Nginx and PHP-FPM on CentOS

Disclaimer: this page is a quicksheet, stub. Proceed to related links for full info.

How to run it with Apache:

yum install mod_fastcgi 

mod_fcgid does not work!

mkdir /var/www/php-fcgi
ln -s /var/www/drupal /var/www/php-fcgi/drupal

vim httpd.conf

LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
  FastCgiExternalServer /var/www/php-fastcgi/drupal -host 127.0.0.1:9000
  AddHandler php-fcgi .php
  Action php-fcgi /php-fastcgi
  Alias /php-fastcgi /var/www/php-fastcgi/drupal
  <Location "/php-fastcgi" >
    Order deny,allow
    Deny from all
    Allow from env=REDIRECT_STATUS
    Options +ExecCGI +FollowSymLinks
    SetHandler fastcgi-script
  </Location>
</IfModule>

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.