How to make work php in nginx
April 14, 2009 11:22AM
Hi all,

I have found this great websever and willing to replace my corporate webserver with this one. But having problem in working php with it.

I have implemented nginx and its working fine. Now to work PHP with it I followed this link:
http://blog.kovyrin.net/2006/05/30/nginx-php-fastcgi-howto/

Create the script and just changed the username to nobody instead of www-data and ran that.
Now replaced the nginx.conf with the one in the site. Now when giving the address in the link
http://10.10.4.20/index.php it gives error like

[b]2009/04/14 21:14:24 [error] 1533#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: some-server.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:12345", host: "127.0.0.1"[/b]

I put the index.php file in /usr/local/nginx/html folder.

Any help will be great.
Re: How to make work php in nginx
April 15, 2009 11:09AM
In that blog post he added

[quote]Since this article has been published long time ago, there is MUCH better option to manage PHP FastCGI processes than the one I described below. Please check out [url=http://php-fpm.anight.org/]php-fpm project from Andrei Nigmatulin[/url] which IMHO is the best possible way to manage PHP processes.[/quote]

While this isn't universally agreed, I like php-fpm. It does require you to compile your own php, but it is worth doing in my opinion. Andrei has not posted an official patch for php 5.2.9 but an unofficial patch that works is posted at http://www.2shared.com/file/5008466/4549200/php-fpm.html.

--
Jim Ohlstein
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 130
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready