无法加载资源:服务器响应状态为 404(未找到)EC2
Failed to load resource: the server responded with a status of 404 (Not Found) EC2
我正在尝试在 EC2 实例上部署我的 rails 应用程序并使用 capistrano。
我收到 404 未找到资产文件的错误,尝试了很多解决方案
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 文件夹下看到资产文件
弄清楚了我必须更改我的服务器配置根目录
尝试更改
nginx root /home/deploy/app_name/public; to /home/deploy/app_name/current/public;
在 nginx 配置文件中 /etc/nginx/sites-enabled/default.
我正在尝试在 EC2 实例上部署我的 rails 应用程序并使用 capistrano。 我收到 404 未找到资产文件的错误,尝试了很多解决方案
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 文件夹下看到资产文件
弄清楚了我必须更改我的服务器配置根目录 尝试更改
nginx root /home/deploy/app_name/public; to /home/deploy/app_name/current/public;
在 nginx 配置文件中 /etc/nginx/sites-enabled/default.