WebFaction
Community site: login faq

I'm getting a bad gateway with the following nginx.conf. curl to localhost:11208 isn't a problem. I am running my own nginx in order to load balance across several cherrypy servers and to setup proxy caching. I assume there is a problem specifying ip address and port?

upstream web_backend {
    server 108.168.205.66:11208;        
    #server 108.168.205.67:15473;
}

server {
    listen 18196;
    server_name  *.foo.com;

    location / {
        proxy_pass  http://web_backend;
    }
}

Adding an error_log to the nginx conf gives me this error:

2013/10/31 01:54:05 [error] 228142#0: 40 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: .foo.com, request: "GET / HTTP/1.0", upstream: "http://108.168.205.66:11208/", host: "bar.foo.com"

This could be a cherrypy config problem? I had:

server.socket_host = "127.0.0.1"

And tried:

server.socket_host = "0.0.0.0"

With no luck. Also there is no log of the attempted connection from cherrypy.

asked 30 Oct '13, 20:25

Grashopa
19617
accept rate: 0%

edited 30 Oct '13, 20:59

cherrypy is refusing the connection. I'm trying to figure out how to set the server.socket_host...

(30 Oct '13, 20:53) Grashopa

It looks like you're trying to expose cherrypy directly on the external interface at 108.168.205.66:11208. For this we'll need to open a port in the server's secondary shared IP, and then you'll need to bind to the open-ports IP instead of the main IP.

Simply open a support ticket and we can add the open-ports IP to your account and then open that port in the firewall. Hope that helps!

permanent link

answered 31 Oct '13, 00:15

ryans ♦♦
5.0k93360
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×32

question asked: 30 Oct '13, 20:25

question was seen: 2,938 times

last updated: 31 Oct '13, 00:15

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM