Welcome! Log In Create A New Profile

Advanced

Re: Unable to see a php page

Francis Daly
March 15, 2020 09:24AM
On Sun, Mar 15, 2020 at 03:58:30PM +0330, Mahmood Naderan wrote:

Hi there,

> For a test, I have installed nginx 1.0.15 with php 5.3 on an Ubuntu 14.04.

> At the same time, I see this entry in /usr/local/nginx/logs/error.log
>
> 2020/03/15 15:50:20 [error] 4808#0: *5 connect() failed (111: Connection
> refused) while connecting to upstream, client: 127.0.0.1, server:
> localhost, request: "GET /public_html/index.php HTTP/1.1", upstream:
> "fastcgi://127.0.0.1:9000", host: "localhost"
>
>
> Why I get connection refused?
> What else should I check for more debugging?

nginx does not "do" php. nginx expects that you have a separate thing
-- in this case, a fastcgi server listening on tcp port 9000 -- that
handles php.

"Connection refused" suggests that you are not running a fastcgi server
there that nginx can access.

You will want to find the Ubuntu method of running the PHP fastcgi
service, possibly called "php-fpm"; and making sure that it is listening
for requests in the place where your nginx does "fasctgi_pass" to.

(As an aside -- the version numbers you mention are not the newest. It
is possible that there are some bugs in those versions that mean that
they do not work well together. If that happens, then you may have more
debugging to do, or choose to use newer versions of things.)

And also -- based on your config, you probably want to make a request for
http://localhost/index.php, not http://localhost/public_html/index.php.
But that will only matter after the current error is resolved.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Unable to see a php page

Mahmood Naderan March 15, 2020 08:30AM

Re: Unable to see a php page

Francis Daly March 15, 2020 09:24AM

Re: Unable to see a php page

Mahmood Naderan March 15, 2020 09:52AM

Re: Unable to see a php page

Francis Daly March 15, 2020 10:02AM

Re: Unable to see a php page

Ian Hobson March 16, 2020 11:14AM

Re: Unable to see a php page

Mahmood Naderan March 16, 2020 02:12PM

Re: Unable to see a php page

Francis Daly March 20, 2020 05:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
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