ruby-on-railsrubydeploymentalibaba-cloudalibaba-cloud-ecs

Ruby on Rails can't load after deploy to Alibaba ECS


I new to deploying to server, I'm trying to deploy my Ruby on Rails project to Alibaba ECS, i have finished deploy but when I'm trying access to my ECS Public IP i got an error 'The Connection has timed out'. I'm trying to curl from the ECS with http://localhost and it's return the project HTML (It's mean the deploy is successful but maybe something wrong with the configuration of the Public IP). I'm trying to ping my public IP from command prompt and it was success. Anyone know what's the problem ? Thank you.

SS Trying access from Browser: Trying access from browser

Ping from other computer CMD : Ping from CMD

CURL from the Alibaba ECS : CURL from the Alibaba ECS

This is my nginx setup:

server {
  listen 80;
  listen [::]:80;

  server_name 47.254.214.231;
  root /home/deploy/livechat/current/public;

  passenger_enabled on;
  passenger_app_env production;

  location /cable {
    passenger_app_group_name livechat_websocket;
    passenger_force_max_concurrent_requests_per_process 0;
  }

  # Allow uploads up to 100MB in size
  client_max_body_size 100m;

  location ~ ^/(assets|packs) {
    expires max;
    gzip_static on;
  }
}

Solution

  • Add port 80/tcp to your security group inbound rules.