legacy-knowledge-base
公開されました Jul. 2, 2025

Liferay Cloud (LXC-SM) で Liferay DXP セッションのタイムアウトを変更する方法

written-by

Matheus Monteiro

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

問題

  • Liferay Cloud (LXC-SM) で実行されている Liferay DXP インスタンスのセッション タイムアウトを変更する必要があります。

Environment

  • Liferay クラウド スタック 4
  • Liferay DXP

解決策

  • 次の内容のスクリプト (.sh ファイル) を作成します。 X を分単位の新しいタイムアウト値とします。
    #!/bin/bash

    timeout=X

    echo "updating web.xml"
    sed -i -e "s/<session-timeout>.*<\/session-timeout>/<session-timeout>$timeout<\/session-timeout>/" $LIFERAY_HOME/tomcat/webapps/ROOT/WEB-INF/web.xml
  • X 、スクリプト ファイルの新しいタイムアウト値 (分) の数値に変更します。
  • .sh ファイルに実行権限を追加します
    例: chmod a+x script.sh
  • スクリプトを liferay/configs/{ENV}/scripts/に配置し、 {ENV} 必要な環境に置き換えるか、すべての環境でこのスクリプトを実行する場合は common に置き換えます。 たとえば、このスクリプトを UATで実行する場合は、 liferay/configs/uat/scripts/に配置します。
  • 必要な環境にデプロイします。
  • 注: CLI 経由でデプロイする場合は、必ずスクリプトを /build/docker/scripts に配置してから Dockerfileを作成してください。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base