upstream, aws elb and resolver

Danilo Moret danilo.moret at descomplica.com.br
Wed Sep 23 20:05:49 UTC 2015


Hello everyone.

I'm trying to setup an Nginx proxy on AWS EC2 with the following general
layout:

mydomain.com > ELB > EC2 Nginx > App's Beanstalk ELB

My first configuration was something like this:

http {
  upstream app {
    server current-app.elasticbeanstalk.com weight 5;
    server new-app.elasticbeanstalk.com weight 1;
  }

  server {
    listen 80;

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

But it stopped working twice so far at around the same time after about one
or two days. After reading more about that setup I found some suggestions
about what could be going on:

http://ghost.thekindof.me/nginx-aws-elb-dns-resolution-nginx-resolver-directive-and-black-magic/
https://stackoverflow.com/questions/26956979/error-with-ip-and-nginx-as-reverse-proxy
http://gc-taylor.com/blog/2011/11/10/nginx-aws-elb-name-resolution-resolvers/
http://forum.nginx.org/read.php?2,255961,255961#msg-255961

Is it still necessary to use variables to force Nginx to resolve? If yes,
to use upstream should I set the servers as variables or adding
$request_uri will do the trick?

Bye!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150923/835b8ad7/attachment.html>


More information about the nginx mailing list