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

ルートコンテキストをカスタムコンテキストに変更する

written-by

Emma Liu

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

問題

  • ポータルのコンテキストをROOTから他のものに変更する方法は?
  • すべてのポータルサイトのURLに "xxx "を付加することは可能ですか?

環境

  • Liferay DXP 7.4
  • Liferay DXP 7.3
  • Liferay DXP 7.2
  • Liferay DXP 7.1
  • Liferay Portal 6.2
  • JBoss EAP 7.1 / Tomcat 9.0

解像度

  • JBossの場合、デフォルトのルートコンテキストをカスタムの「myportal」コンテキストに変更する例を以下に示します。
    1. {JBOSS_HOME}/standalone/deployments で、ROOT.war と ROOT.war.deployed を myportal.war と myportal.war.deployed にリネームしてください。
    2. からWEB-INF/jboss-web.xmlを変更します。
      <context-root>/</context-root>
      下記に変更します。
      <context-root>myportal</context-root>
    3. Jbossの「tmp」フォルダーを片付ける
    4. サーバーを再起動する
  • Tomcatの場合、デフォルトのルートコンテキストをカスタム 'myportal' コンテキストに変更する例を以下に示します。
    1. ROOT フォルダ名( {LIFERAY_HOME}/tomcat_home/webapps/ROOTの下)を 'myportal' に更新します。
    2. ROOT.xml ファイル名( {LIFERAY_HOME}/tomcat_home/conf/Catalina/localhost/以下)を 'myportal.xml' に更新します。
    3. common.loader property in catalina.properties file name (under {LIFERAY_HOME}/tomcat_home/conf/) から更新してください:
      common.loader=“${catalina.home}/webapps/ROOT/WEB-INF/lib/support-tomcat.jar”
      宛先
      common.loader=“${catalina.home}/webapps/myportal/WEB-INF/lib/support-tomcat.jar”
    4. TOMCAT_HOMEの下のtempとworkディレクトリをクリアする。
    5. サーバーを再起動する。
  • 元のポータルサイトのURLは「localhost:8080/」です。 ポータルコンテキストを変更すると、ポータルURLは「localhost:8080/myportal/」に変更されます。

追加情報

  • 上記の設定は、アプリケーションサーバーの設定です。 その他の推奨事項については、対応するアプリケーションサーバーベンダーと協議する必要があります。
did-this-article-resolve-your-issue

legacy-knowledge-base