Alex Girard home in English en Francais

FastCGI configuration with Nginx on CentOS

20 May 2008 – Madrid

After a week of “502 Bad Gateway” error on blog.feevy.com, it was time to dive in our new Nginx toy on Feevy server and understand what happened.

First, Nginx is not like Apache or Lighttpd, it doesn’t support FastCGI by default. So, you need to be sure you’ve compiled the fcgi module with your PHP installation.

On Centos, to compile a new PHP, just launch: /scripts/easyapache

Then you’ll need to launch the FastCGI process, download this FastCGI script, place it in /usr/local/bin, and add it to your init.d.

At the end, you just need to configure your php server in nginx, that would be the most simple part:

blog comments powered by Disqus