Welcome! Log In Create A New Profile

Advanced

Re: "Connection Refused" with nginx as reverse proxy

Radha Venkatesh (radvenka)
February 01, 2016 11:26AM
Francis,

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 128.107.138.162:8080 0.0.0.0:* LISTEN



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

curl -v http://128.107.138.162:8080/rhesos-server/rhesos/api/v1/ping

* About to connect() to 128.107.138.162 port 8080 (#0)
* Trying 128.107.138.162...
* 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 128.107.138.162:8080; Connection refused
* Closing connection 0
curl: (7) Failed connect to 128.107.138.162:8080; 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.

Thanks,
Radha.



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

>On Mon, Feb 01, 2016 at 01:00:04AM +0000, Radha Venkatesh (radvenka)
>wrote:
>
>Hi there,
>
>> server {
>> listen 127.107.138.162:8080;
>
>> 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>@128.107.138.162:8080'
>>http://10.154.181.43:8080/rhesos-server/rhesos/api/v1/ping
>
>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@daoine.org
>
>_______________________________________________
>nginx mailing list
>nginx@nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx

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

"Connection Refused" with nginx as reverse proxy

Radha Venkatesh (radvenka) January 31, 2016 08:02PM

Re: "Connection Refused" with nginx as reverse proxy

Francis Daly February 01, 2016 03:34AM

Re: "Connection Refused" with nginx as reverse proxy

Radha Venkatesh (radvenka) February 01, 2016 11:26AM

Re: "Connection Refused" with nginx as reverse proxy

Francis Daly February 01, 2016 12:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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