LoginSignup
2
3

More than 5 years have passed since last update.

EngineYard Cloudで カスタマイズしたメンテナンス画面を表示する

Posted at

503 でカスタムページ表示

1. カスタムメンテナンスのhtmlファイルを作って置く

置き場所
{Rails.root}/public/maintenance.html

2. git commit & deploy

コマンド
# git コミット
$git commit -am 'added custom maintenance'
# デプロイ
$ey deploy

3. メンテナンスに入れてみる

コマンド
# メンテナンスに
$ey web disable

# ブラウザでページを開いて確認
$ey launch 

# メンテナンスを開ける
$ey web enable
  • Nginxのログにはアクセスが来るが、Railsのログにはアクセスはちゃんと来ない

複数のメンテナンスページに対応

以下のように表示の優先順位がある。
Defaultのメンテナンスを用意しておいて、緊急メンテンナンスはそれをCopyして作り変えるなど便利。

  1. public/maintenance.html.custom
  2. public/maintenance.html.tmp
  3. public/maintenance.html
  4. public/system/maintenance.html.default

参考

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3