問題
- ネットワークで利用可能なプロキシをバイパスするために、Liferay で行うプロキシの設定はどのようになっていますか?の場合
環境への配慮
- Liferayポータル6.2
- Liferay DXP 7.0, 7.1, 7.2, 7.3, 7.4
決議
プロキシを設定するためにLiferay側で行った設定を以下に示します。
-
-
system-ext.properties (パスはROOT/WEB-INF/classes/system-ext.properties)にこれらのプロパティを追加します。(パスはROOT/WEB-INF/class/system-ext.properties)
#
ネットワーク内で利用可能なプロキシをバイパスするために設定するプロパティです。
# See portal.properties for more HTTP settings.
#
#
# Set the location of the HTTP proxy that the portal will use to fetch
# external content.
#
# Set http.nonProxyHosts for hosts that will not be proxied. This is useful
# for proxied environments where you need direct access to internal servers.
# This should follow the same semantics as the java.net package.
#
#http.proxyHost=192.168.0.200
#http.proxyPort=4480
#http.nonProxyHosts=192.168.0.250 -
これに加えて、HTTPプロキシ認証がある場合は、 portal-ext.propertiesに以下のプロパティをそれぞれのクレデンシャルで設定します。
# Set user name and password used for HTTP proxy authentication.
注意: DXP 7.4 アップデート 23 以降、これらのプロパティは次のように名前が変更されました:
#
# Env: LIFERAY_COM_PERIOD_LIFERAY_PERIOD_PORTAL_PERIOD_UTIL_PERIOD__UPPERCASEH_TTP_UPPERCASEI_MPL_PERIOD_PROXY_PERIOD_PASSWORD
# Env: LIFERAY_COM_PERIOD_LIFERAY_PERIOD_PORTAL_PERIOD_UTIL_PERIOD__UPPERCASEH_TTP_UPPERCASEI_MPL_PERIOD_PROXY_PERIOD_USERNAME
#
#com.liferay.portal.util.HttpImpl.proxy.username=
#com.liferay.portal.util.HttpImpl.proxy.password=
#com.liferay.portal.kernel.util.Http.proxy.username= #com.liferay.portal.kernel.util.Http.proxy.password=
-
system-ext.properties (パスはROOT/WEB-INF/classes/system-ext.properties)にこれらのプロパティを追加します。(パスはROOT/WEB-INF/class/system-ext.properties)
3. 注意: このステップではサーバーの再起動が必要なので、アプリケーションサーバーのダウンタイムにこのアクティビティを実行してください。
追加情報