ナレッジベース
公開されました Jun. 30, 2025

仮想ホストがアクティブな場合、サイト URL から /web/guest を削除できません

Written By

Kanchan Bisht

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.

問題

  • 仮想ホストが構成されている場合、サイト URL から /web/guest を削除することはできません。 /web/guest なしでアクセスすると、ページが読み込まれ続け、ログに 404 エラーが表示されます。

Environment

  • Liferay DXP 7.3

解決策

  • この動作は、ユーザーが次のプロパティを false に設定した場合に発生する可能性があります。 portal-ext.properties ファイル で次のプロパティを削除するか true に設定する必要があります。 com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter=false
  • 同様に、これが機能する場合があるため、次のプロパティを追加します。
    #
    # Specify the site name that will default to the company's virtual host.
    # If the specified site has a virtual host, then that will take precedence.
    # If it does not, then it will use the company's virtual host. This property
    # is useful to remove "/web/guest" (or any other site) from the default URL.
    # For example, if this property is not set, then the default URL may be
    # http://localhost:8080/web/guest/home. If this property is set, then the
    # default URL may be http://localhost:8080/home.
    #
    virtual.hosts.default.site.name=Guest

追加情報

  • プロパティを変更する前に、アプリケーション サーバーを停止してください。
    1) 実行中のアプリケーションを停止します。
    2) 上記のプロパティを portal-ext.properties ファイルに追加します。
    3) すべての一時フォルダーをクリアする
    clear osgi/state
    clear {liferay_home}/work
    clear {liferay_home}/tomcat/temp
    clear {liferay_home}/tomcat/work
    4) アプリケーションを再起動します
  • portal-ext.properties ファイルが変更されるたびに、サーバーを再起動する必要があることに注意してください。変更は再起動後にのみ反映されるためです。
Did this article resolve your issue ?

ナレッジベース