legacy-knowledge-base
公開されました Sep. 10, 2025

セッションタイムアウト時に異なるクラスタノードに異なるランディングページを設定する。

written-by

Alexandra Rujzam

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • セッションが切れると、ユーザーはノードによって異なるページにリダイレクトされる必要があります。
  • 考えられる使用例です:アプリケーションサーバーの1つは管理サーバーであるため、セッションの終了時に管理者を通常のURLとは異なるURL(管理サイト)にリダイレクトする必要があります。

環境

  • Liferay DXP 7.0
  • Liferay DXP 7.1

解決策

  • 以下のプロパティは、セッションが切れたときにユーザーをデフォルトのページにリダイレクトするものなので、ノード上でポータルのデフォルトのホームURLを弄ることで目的を達成することができます。
    session.timeout.redirect.on.expire=true
  • 例えば、ノード1で以下のページをデフォルトのランディングページにしたいとします:
    タイトル:admin
    URL: http://localhost:8080/web/guest/admin/
    1. サーバーを停止し、portal-ext.propertiesにNode 1の以下のプロパティを設定します:
      company.default.home.url=/web/guest/admin/
      session.timeout.warning=0
      session.timeout.auto.extend=false
      session.timeout.redirect.on.expire=true
    2. ノード2には、以下のプロパティを設定します。この場合、元のゲストのホームページがデフォルトのランディングページとなります:
      company.default.home.url=/web/guest/
      session.timeout.warning=0
      session.timeout.auto.extend=false
      session.timeout.redirect.on.expire=true
    3. サーバーを再起動し、Node 1ではセッションタイムアウト時に管理画面にリダイレクトされ、Node 2ではセッション終了後にゲストホームページがロードされることを確認します。
did-this-article-resolve-your-issue

legacy-knowledge-base