Legacy Knowledge Base
公開されました Sep. 10, 2025

異なるホスト名で複数のサイト名を構成する方法

Written By

Prarthana Jadhav

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • ポータルで複数のサイトを異なるホスト名で構成する方法は? 以下の例は、その要件を説明するものです。
    サイトAとサイトBの2つのサイトがある場合、
    1) サイトAはa.site.comとマッピングされるべきである
    2) サイトBはb.site.comとマッピングされるべきである
  • それは、www.a.site.com:8080 がヒットしたとき、サイトAにリダイレクトすることです。

環境

  • Liferay DXP 7.2

解決策

  • ホスト名は、以下の手順で設定することができます。
    1) 「サイトA」と「サイトB」という名前の2つのサイトを作成する
    2) オペレーティングシステムのhostsファイル(/etc/hostsファイル)で、サーバーIPと「a.site.com」「b.site.com」ホスト名を対応付ける。
    3) サイトA->に移動します。サイト管理->構成>サイト設定>サイトのURLを入力し、「a.site.com」と入力します->保存。
    4)サイトBのb.site.comとしてサイトURLを入力します。
    5)ここで、 wwwにアクセスします。 。 a.site.com:8080 の場合、 サイトA にリダイレクトされます。 3> および b.site.com:8080 は サイトBにリダイレクトされます。
  • このように、異なるサイトでも同じポータルで複数のホストネームを設定することができます。
Did this article resolve your issue ?

Legacy Knowledge Base