在通过 capistrano 将生产环境中的 ruby on rails 项目部署到 ec2 上的实例后,我在 nginx 错误日志中收到以下错误。亚马逊公共主机显示 502 Bad Gateway nginx/1.10.0 (Ubuntu)。我按照https://www.sitepoint.com/deploy-your-rails-app-to-aws/ 中的教程 进行操作 运行 cap production deploy 时,似乎没有创建 puma.sock ..
2017/06/28 01:09:57 [crit] 12802#12802: *1 connect() to unix:/home/deploy/app_name/shared/tmp/sockets/puma.sock failed (2: No such file or directory) while connecting to upstream, client: 173.198.30.2, server: localhost, request: "GET / HTTP/1.1", upstream: "http://unix:/home/deploy/app_name/shared/tmp/sockets/puma.sock:/", host: "host"
Run Code Online (Sandbox Code Playgroud)
以下是我的 deploy.rb
set :application, 'app_name'
set :repo_url, 'git@github.com:github_account/app_name.git' # Edit this to match your repository
set :branch, :master
set :deploy_to, '/home/deploy/app_name'
set …Run Code Online (Sandbox Code Playgroud)