legacy-knowledge-base
公開されました Jun. 30, 2025

nginxにモジュールをロードする

written-by

Jorge García Jiménez

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

問題

  • 特定の場所からのIPアクセスを制限するためのモジュールをロードする必要があります。 この動作を実現するためには、「ngx_http_geoip_module」を有効にする必要があります。
  • liferay.confに「load_module modules/ngx_http_geoip_module.so;」と記述すると、以下のエラーが発生します。
    "load_module" directive is not allowed here in /etc/nginx/conf.d/liferay.conf:1

Environment

  • LXC-SM、Liferay DXP 7.2 with stack 5.x

解決策

  • nginxでモジュールを読み込むには、nginx.confを変更するか、以下のパスに新しい設定ファイルを追加する必要があります:
    /webserver/config/{env}/myfile.conf
    こうすることで、load_moduleディレクティブが正しく処理され、モジュールがウェブサーバーサービスにロードされます。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base