Welcome! Log In Create A New Profile

Advanced

Re: connect() failed (111: Connection refused) while connecting to upstream

Francis Daly
December 03, 2012 03:46PM
On Mon, Dec 03, 2012 at 03:29:19PM -0500, Gallitin wrote:

Hi there,

> Via SSH? Yes I can do this.

Yes, so long as you are running curl on the same machine that nginx is
running on, it should be a valid network test.

> When I do that it says
>
>
> HTTP/1.1 404 Not Found

<snip>

> <address>Apache Server at 108.166.94.94 Port 7080</address>

<snip>

Ok, that suggests that there is a listener on the host:port that nginx
is trying to access. If you add "-H Host:demo.domain.com " to the curl
command (just after "-i "), you will more closely mimic what nginx should
be doing -- that might show you the correct content.

> No if I do:
> curl -i http://domain.com/assets/js/msgFBmodal.js
>
> It returns the page code from that file.

I'm unsure what you mean here.

If it is "now it is all working", then that's good and the most likely
reason for the problem was that apache was not running, or was firewalled,
when you first tested and that has now been fixed.

If it is "here is a similar thing that is working, but my test case is
not", then can you provide enough of the nginx.conf to allow the test
be reproduced? Probably, that will be just the location{} block that has
the proxy_pass that is used in the request, plus the relevant upstream{}
definition if there is one, plus whatever config is in that server{}
but outside all location{}s.

(Or just include the whole nginx config.)

Cheers,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

connect() failed (111: Connection refused) while connecting to upstream

Gallitin December 03, 2012 03:08PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Jonathan Matthews December 03, 2012 03:20PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Gallitin December 03, 2012 03:20PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Francis Daly December 03, 2012 03:24PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Gallitin December 03, 2012 03:29PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Francis Daly December 03, 2012 03:46PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Gallitin December 03, 2012 04:32PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Valentin V. Bartenev December 03, 2012 04:56PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Gallitin December 03, 2012 04:56PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Jonathan Matthews December 03, 2012 05:02PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Gallitin December 03, 2012 05:03PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Jonathan Matthews December 03, 2012 05:20PM

Re: connect() failed (111: Connection refused) while connecting to upstream

Francis Daly December 03, 2012 07:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready