Welcome! Log In Create A New Profile

Advanced

Re: Best way to use PHP with nginx?

John Moore
November 13, 2009 09:48AM
Nuno Magalhães wrote:
> On Fri, Nov 13, 2009 at 13:45, John Moore <grails@jmsd.co.uk> wrote:
>
>> I have come across a handful of different methods detailed on the Internet
>> for getting PHP running with nginx, but haven't come across the 'definitive'
>> version. What method do the regular nginx users on here favour?
>>
>
> Did you search? You'll need a FastCGI daemon or you can proxy it to
> apache's mod_php or something else. There's no definite method, so
> it's your pick. On Debian the php-cgi package serves me just fine.
>
>
Yes, I searched - the fact that I said "I have come across a handful of
different methods detailed on the Internet for getting PHP running with
nginx" surely indicates that. In fact, I've been running a PHP/nginx
combination for some time, using the technique outlined here:


http://jit.nuance9.com/2008/01/serving-php5-with-nginx-on-ubuntu-710.html

It works fine, although I've not tested it under load. But I came across
this posting, which suggested a more efficient way to do it:

http://tomasz.sterna.tv/2009/04/php-fastcgi-with-nginx-on-ubuntu/

He says "There are dozens of HOWTOs for configuring nginx to direct .php
files requests to FastCGI, but only a few covering the topic of running
the PHP FastCGI backend. None of them covers the correct way, though.
Let me show you how to get it right…PHP CGI binary is perfectly able
running a FastCGI interface by itself. There is no need to run it with
an external wrapper. No need to install anything more than the PHP itself."

When I tried a while back, I couldn't get this working, I can't exactly
recall why, but I was planning on giving it another go unless I came
across another technique which I knew was widely adopted with success,
hence my question.

I suppose I should really have named the topic "Best way to use PHP with
nginx under Ubuntu" because that's what I'm most interested in.
Subject Author Posted

Best way to use PHP with nginx?

John Moore November 13, 2009 08:50AM

Re: Best way to use PHP with nginx?

vesperto November 13, 2009 08:56AM

Re: Best way to use PHP with nginx?

John Moore November 13, 2009 09:48AM

Re: Best way to use PHP with nginx?

John Moore November 13, 2009 09:48AM

Re: Best way to use PHP with nginx?

vesperto November 13, 2009 10:24AM

Re: Best way to use PHP with nginx?

Jérôme Loyet November 13, 2009 10:32AM

Re: Best way to use PHP with nginx?

vesperto November 13, 2009 10:38AM

Re: Best way to use PHP with nginx?

Arie Karhendana November 13, 2009 10:44AM

Re: Best way to use PHP with nginx?

Momchil Ivanov November 15, 2009 09:28AM

Re: Best way to use PHP with nginx?

Jérôme Loyet November 15, 2009 09:54AM

Re: Best way to use PHP with nginx?

Jérôme Loyet November 15, 2009 10:56AM

Re: Best way to use PHP with nginx?

Grzegorz Nosek November 16, 2009 04:16AM

Re: Best way to use PHP with nginx?

Peter Leonov November 13, 2009 11:08AM

Re: Best way to use PHP with nginx?

Grzegorz Nosek November 13, 2009 11:32AM

Re: Best way to use PHP with nginx?

Peter A Leonov November 13, 2009 02:12PM

Re: Best way to use PHP with nginx?

John Moore November 13, 2009 12:58PM

Re: Best way to use PHP with nginx?

Jérôme Loyet November 13, 2009 01:10PM

Re: Best way to use PHP with nginx?

Juan Fco. Giordana November 14, 2009 11:06AM

Re: Best way to use PHP with nginx?

William Dode November 15, 2009 12:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready