NGINX + unicorn + Rails 設定時のハマりどころ
Rails Tutorial の成果物を EC2 で動かすための環境構築でハマった箇所のメモです。
unicorn と nginx の起動ユーザが一致している必要があるらしい。
aws nginx + unicorn (13:permission dnined) while connecting to upstream でハマッた時に試したことのTIPSunicorn.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
Author And Source
この問題について(NGINX + unicorn + Rails 設定時のハマりどころ), 我々は、より多くの情報をここで見つけました https://qiita.com/ikuhanaRock/items/122cd4e9f21aceeb538b著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .