Tag Archives: nginx

nginx+php-cgi+spawn-fcgi

Apache+php — old pack, good, stable, but very voraciousĀ in comparison with nginx

install nginx php5 php-cgi spawn-fcgi.

#variant 1

start php-cgi with spawn-fcgi:

spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 9000 -C 2 -P /var/log/nginx/php.pid -u www-data -g www-data

#variant2

using unix sockets:

exec /usr/bin/spawn-fcgi -s /tmp/php-cgi.sock /usr/bin/php-cgi -C 2 -P /var/log/nginx/php.pid -u www-data -g www-data

Write a script to run several processes:

Continue reading nginx+php-cgi+spawn-fcgi