"Connection Refused" with nginx as reverse proxy

Radha Venkatesh (radvenka) radvenka at cisco.com
Mon Feb 1 16:24:20 UTC 2016


Thank you for pointing out the discrepency in the ip address. I have fixed
that and the netstat out looks like this

netstat -anp | grep 8080
tcp        0      0*               LISTEN

And I issued the curl command like this, but I still see this error

curl -v

* About to connect() to port 8080 (#0)
*   Trying
* Adding handle: conn: 0x7ffb9c003a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7ffb9c003a00) send_pipe: 1, recv_pipe: 0
* Failed connect to; Connection refused
* Closing connection 0
curl: (7) Failed connect to; Connection refused

Also, my curl command with the proxy set in the command is trying to
simulate how the real request is going to come in to the server.


On 2/1/16, 12:32 AM, "Francis Daly" <francis at daoine.org> wrote:

>On Mon, Feb 01, 2016 at 01:00:04AM +0000, Radha Venkatesh (radvenka)
>Hi there,
>>   server {
>>     listen;
>> However, when I use the curl command to send a request using the proxy
>>like this, I see a "Connection Refused"
>> curl -v -x 'http://<username>:<password>@'
>Two things there:
>* the "listen" address and the "curl -x" address are not the same.
>* nginx is not a proxy
>Just make your curl request as normal to the nginx server.
>> Can someone tell what is wrong in my configuration?
>Possibly nothing.
>	f
>Francis Daly        francis at daoine.org
>nginx mailing list
>nginx at nginx.org

More information about the nginx mailing list