2016-02-26 262 views
0

我試圖在EC2實例上部署我的rails應用程序並使用capistrano。 我收到404資產找不到文件的錯誤嘗試了許多解決方案加載資源失敗:服務器響應狀態爲404(未找到)EC2

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到比如我可以看到下想通了這一點了,我不得不共享/公共/資產的文件夾

+0

在當前的符號鏈接中,public/assets/jquery.fancybox-buttons-bc75396a9f71beda584274c69d094623.css存在嗎?如果是這樣,你的網絡服務器是指向公衆/作爲webroot? –

+0

您可以請解釋一下,對開發者來說是新的 –

回答

0

資產文件改變我的服務器配置根 嘗試在nginx的配置文件/ etc/nginx的/啓用的站點 - /更改默認

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

相關問題