Apache2.4 から httpsサーバーへリバースプロキシする方法

カテゴリ リバースプロキシ コアバージョン 8.9.x 関連モジュール mod_proxy mod_proxy_http mod_ssl

ドメイン「proxy-domain.com」において
・パス「/sub/〜」 の ときのみ 「sub-domain.com/sub/〜」 に
・そのほかのパスのときは「main-domain.com/〜」に
リバースプロキシするには

  • mod_ssl を有効にする
  • mod_proxy を有効にする
  • mod_proxy_http を有効にする

「main-domain.com」側の httpd.conf 等に 以下の記述を追加する

        ProxyRequests off
        SSLProxyEngine on
        <Location />
                ProxyPass https://main-domain.com/
                ProxyPassReverse https://main-domain.com/
                ProxyPassReverseCookieDomain main-domain.com proxy-domain.com
                ProxyPassReverseCookiePath / /
                RequestHeader unset Accept-Encoding
                AddOutputFilterByType SUBSTITUTE text/plain text/html application/javascript text/javascript
                Substitute "s|httsp://main-domain.com/|https://proxy-domain.com/|q"
        </Location>
        <Location /en/>
                ProxyPass https://sub-domain.com/en/
                ProxyPassReverse https://sub-domain.com/en/
                ProxyPassReverseCookieDomain sub-domain.com proxy-domain.com
                ProxyPassReverseCookiePath / /en/
                RequestHeader unset Accept-Encoding
                AddOutputFilterByType SUBSTITUTE text/plain text/html application/javascript text/javascript
                Substitute "s|https://sub-domain.com/en/|https://proxy-domain.com/en/|q"
        </location>

OTHER FAQ

Drupal開発・運用の疑問/質問の答えはここに

無料ユーザー登録すると質問できます。

カテゴリ降順で並び替える Core Ver. 関連モジュール タイトル
video 8.4x video map 動画上にクリッカブルマップを作成する方法
Views 8.4x hook_views_query_alter Viewsクエリに多くの条件を追加する方法
Views 8.4x hook_views_query_alter 現在のViewsクエリを保存・再現する方法
Views 8.4x hook_views_query_alter Viewsクエリの条件式にサブクエリを追加する方法
Views Exposed Filter 8.4x hook_views_pre_view Views Exposed Formの複数単語入力(textfield)をフォーム上だけ複数行入力(textarea)にする方法
Viewsプログラミング 8.4x Views drupal8におけるViewsプログラミング
Viewsプログラミング 8.6.x Views Drupal8 Viewsの動的キャッシュをクリアする方法
アップデート 8.9.x PHP CentosでPHPのバージョンアップ(例:5.3->5.6)を行う方法
アップデート 7.34 Distribution(Commerce Kickstart) drushでcommerce_kickstartのアップデートに失敗する
アップデート 8.7.2 menu drupal-core 8.7.2にupdateしたところ
アップデート 8.9.x Composer update composer update するときに パッチが必要なモジュールが更新されパッチが消えてしまうことへ対応する方法
アップデート 7.28 DisableMessages モジュールのアップデートガイダンスを非表示にしたい
アップデート 8.8.x Composer composer updateが異常終了する
アップデート 7.34 Core 簡単にCoreのセキュリティアップデートがしたい
アップデート 7.50 Download count DOWNLOAD MODULEページでダウンロードが失敗することがある
アップデート 7.28 Views Pagerが表示されなくなった
アップデート 7.16 Core 7.15→7.16アップデート
アップデート 8.9.x composer patch patch を composer に 組み込む方法
アップデート 7.15 Webform Backup_and_Migrate drupal7.12 -> drupal7.14アップデートメモ
アップデート 8.9.x Composer update Composer で drupal/core-8.9.7 に更新できなくなった場合の処置

ページ