【问题标题】:Failed to load resource: the server responded with a status of 404 (Not Found) EC2加载资源失败:服务器响应状态为 404 (Not Found) EC2
【发布时间】:2016-02-26 12:32:08
【问题描述】:

我正在尝试在 EC2 实例上部署我的 Rails 应用程序并使用 capistrano。 我得到了资产文件的 404 not found 错误尝试了很多解决方案

http://52.36.187.96/assets/jquery.fancybox-buttons-bc75396a9f71beda584274c69d094623.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://52.36.187.96/assets/application-e80ce0393dc75b248766cc80da46f627.js Failed to load resource: the server responded with a status of 404 (Not Found)

当我 ssh 进入实例时,我可以在 shared/public/assets 文件夹下看到 assets 文件

【问题讨论】:

  • 在当前符号链接中,public/assets/jquery.fancybox-buttons-bc75396a9f71beda584274c69d094623.css 是否存在?如果是这样,您的网络服务器是否指向 public/ 作为 webroot?
  • 你能解释一下,新的开发操作

标签: ruby-on-rails amazon-web-services amazon-ec2 capistrano3


【解决方案1】:

想通了,我不得不更改我的服务器配置根目录 尝试改变

nginx root /home/deploy/app_name/public; to /home/deploy/app_name/current/public; 

在 nginx 配置文件 /etc/nginx/sites-enabled/default.

【讨论】:

    猜你喜欢
    • 2018-06-08
    • 2021-07-22
    • 2017-04-26
    • 1970-01-01
    • 1970-01-01
    • 2019-08-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-25
    相关资源
    最近更新 更多