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

API URLの変更方法

written-by

Balázs Létai

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

問題

  • URLから/o/を削除すると、URLは認識されなくなる。

Environment

  • Liferay DXP 7.1+

解決策

  • 例えばapi.something.comのようなホスト名を作り 、Apache(またはNginx)に/oでLiferayへのプロキシパスをさせることができます。

    以下はサンプル設定で、例えばlocalhost

    httpd.confを抜き出して実装することができます:

    <VirtualHost *:80>
    ServerName api.localhost

    ProxyTimeout 300
    ProxyRequests on
    ProxyPreserveHost On

    <Location />
    ProxyPass http://localhost:8080/o/
    ProxyPassReverse http://localhost:8080/o/
    </Location>

    </VirtualHost>



    http://api.localhost/headless-delivery/v1.0/sites/20121/content-elements

    http://localhost:8080/o/headless-delivery/v1.0/sites/20121/content-elements の代わりに

did-this-article-resolve-your-issue

legacy-knowledge-base