1

I set up an EC2 instance with torquebox and nginx. Torquebox starts without any errors, but I cannot access it at port 8080. Not even if I add a VPC rule to open that port.

I get Gateway timed out if I go diectly to myip:8080 and Bad gateway if I visit myip with this nginx config:

server {
  listen 80 default deferred;
  # server_name ;
    location / {
      access_log off;
      proxy_pass http://127.0.0.1:8080;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

I tried to set proxy_pass to the server ip but that did not help either.

The nginx log contains the following error:

connect() failed (113: No route to host) while connecting to upstream, client: "myip", server: , request: "GET / HTTP/1.1", upstream "http://"myserverip":8080/", host: "myserverip"

I tried to just run rails s and visited myip:3000 and the test rails app was running perfectly.

Any ideas how to solve this?

Allanon
  • 111
  • 1
  • 5

0 Answers0