Pound

pound側の設定 [#hf9e3ce9]

以下をそれぞれのディレクティブへ追加する

 ListenHTTPS
    AddHeader  "X-Forwarded-Proto: https"
    HeadRemove "X-Forwarded-Proto"
 End
 ListenHTTP
    AddHeader  "X-Forwarded-Proto: http"
    HeadRemove "X-Forwarded-Proto"
 End

バックエンドのWebサーバーの設定 [#x508168c]

 ### SSL Redirect
 RewriteEngine On
 RewriteCond %{HTTP:X-Forwarded-Proto} =http
 RewriteRule ^/(.*)?$ https://%{HTTP_HOST}/$1 [R=301,L]