Rails Tutorial の成果物を EC2 で動かすための環境構築でハマった箇所のメモです。
-
unicorn と nginx の起動ユーザが一致している必要があるらしい。
aws nginx + unicorn (13:permission dnined) while connecting to upstream でハマッた時に試したことのTIPS -
unicorn.sock ファイルの配置場所は、 /tmp/ではなく、railsディレクトリ配下の tmp/に配置する必要があるらしい。
-
httpでアクセスすると、https にリダイレクトしてしまう場合、以下の設定を追加する。
config/environments/production.rb# 既定値は、 config.force_ssl = true config.fore_ssl = false
-
cssが反映されない場合、以下の設定を追加する。
config/environments/production.rbconfig.serve_static_files = true