看板 Ruby 關於我們 聯絡資訊
手頭上有一台乾淨的 ubuntu 14.04 的主機 目前裝有 rvm(1.26.11) + ruby(2.2.1p85) nginx with passenger 透過以下的 document 安裝的 https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/ 最後網站卻只給了我403 forbindden... 目前確定 public 資料夾下的靜態檔案是可以正常連結 唯一我覺得有可能的問題應該是在 nginx.conf 裡 passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; passenger_ruby /home/ubuntu/.rvm/gems/ruby-2.2.1/wrappers/ruby; 這一段但是 sudo passenger-memory-stats 看到的資訊應該表示我沒有設錯? 不知道有沒有大大可以指點一下方向? vhost 設定裡 server block 裡已設定 passenger_enabled 已開 root 也是指向 public 資料夾 另外... deploy 是用 mina 去 deploy 的但我覺得應該不影響 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.135.83.164 ※ 文章網址: https://www.ptt.cc/bbs/Ruby/M.1454049043.A.FA7.html
corrian: check config/secrets.yml 01/29 16:11
corrian: need to use rake secert to create key and set env 01/29 16:12
secrets 我已經有設定了喔...:) ※ 編輯: dars94 (220.135.83.164), 01/29/2016 18:43:34
wuboy: 看 nginx的error log啊 會告訴你為什麼403 01/29 21:02
抱歉忘了貼 directory index of "/var/www/xxxx/current/public/" is forbidden ※ 編輯: dars94 (182.234.199.219), 01/29/2016 21:26:47
l7th: check the owner of the public directory and if 775 01/29 23:00
目前的狀態是這樣...一樣403.. lrwxrwxrwx 1 ubuntu ubuntu 10 Jan 28 09:53 current -> releases/6 drwxrwxrwx 8 ubuntu ubuntu 4.0K Jan 28 09:53 release ※ 編輯: dars94 (182.234.199.219), 01/29/2016 23:16:13
CP64: location / 裡面加個 autoindex on; ? 01/30 19:29
CP64: 看起像是預設沒開資料夾 Index 會出的錯誤 01/30 19:30
現在瀏覽會把檔案 index 出來,並沒有正確的看到 rails 的歡迎畫面 看起來是 nginx 沒有 pass 讓 passenger 處理到 ※ 編輯: dars94 (182.234.199.219), 01/30/2016 22:22:49 anyway... 最後我把 aws instance 整個砍掉重做 流程步驟一樣這次就正常了...Orz ※ 編輯: dars94 (182.234.199.219), 01/31/2016 03:07:30