1

Have a Standard Node.JS Project. When Deployed on AWS, The Server is Running and initializing Properly But NGINX gives the Below Error

-------------------------------------
/var/log/nginx/error.log
-------------------------------------
2015/04/18 10:49:56 [error] 4445#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.XX.XX, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "stagingmyproj.elasticbeanstalk.com"
2015/04/18 10:49:56 [error] 4445#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.XX.XX, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8081/favicon.ico", host: "stagingmyproj.elasticbeanstalk.com"
2015/04/18 10:50:05 [error] 4445#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.XX.XX, server: , request: "GET /vendor/login HTTP/1.1", upstream: "http://127.0.0.1:8081/vendor/login", host: "stagingmyproj.elasticbeanstalk.com"
2015/04/18 10:50:06 [error] 4445#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.XX.XX, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8081/favicon.ico", host: "stagingmyproj.elasticbeanstalk.com"
2015/04/18 10:50:28 [error] 4445#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.XX.XX, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "stagingmyproj.elasticbeanstalk.com"
2015/04/18 10:50:28 [error] 4445#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.XX.XX, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8081/favicon.ico", host: "stagingmyproj.elasticbeanstalk.com"

I am using the AWS Elastic BEanstalk Console. Not the Command Line Tool. Not sure If I am even using NGInx.

I am not a Dev Ops Person, But I don't have any clue about NGinx. What's the best possible solution out of here?

Cheers and Thanks in Advance.

godimedia
  • 987
  • 2
  • 12
  • 28

1 Answers1

1

Take a look at this answer that I answered previously. A lot of people have issues with one part, so the answer tries to explain everything from your browser down to nginx: elastic beanstalk weird nginx configuration

It should at least give you a starting point for debugging and being able to eliminate issues.

Community
  • 1
  • 1
Josh Davis
  • 6,651
  • 2
  • 25
  • 25