Best practice with nginx and php; apache or php-fcgi


#1

On my server 90% of the apps are rails with a few remaining php apps.
What is the best method to handle php with nginx? Is it better to use
php-fcgi or reverse proxy to apache?


#2

On Jul 31, 2007, at 5:26 PM, Greg wrote:

On my server 90% of the apps are rails with a few remaining php apps.
What is the best method to handle php with nginx? Is it better to use
php-fcgi or reverse proxy to apache?

IMHO just use php-fcgi. It works very well with nginx, you just need
to hack up a script to start the php-fcgi’s or steal spawn-fcgi from
lighttpd and use that. No need to bring out apache if you just need
some php sprinkled into your nginx setup.

Cheers-
– Ezra Z.
– Founder & Ruby Hacker
– removed_email_address@domain.invalid
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)


#3

Ok. Thanks Ezra! My new dedicated came with apache 2.2, so I’ll
disactivate that. I’m assuming, and I’ll have to double check, that
I’ll
have to recompile php for it?