手順
- Tomcatサーバーを停止します。
- 設定を完了させます。設定ファイルは<TomcatPath>/bin/setenv.shです。このファイルが存在しない場合は作成します。
-
次のパラメーターを追加し、設定に一致するよう変更します:
CATALINA_OPTS=$CATALINA_OPTS -Dhttp.proxyHost=proxy.server.com # Specify the host name or IP address of your HTTP proxy server. You can use this parameter for http and https host names. CATALINA_OPTS=$CATALINA_OPTS -Dhttp.proxyPort=YourHttpProxyPort # Specify the port number of your proxy server. CATALINA_OPTS=$CATALINA_OPTS -Dhttp.nonProxyHosts="localhost|host.mydomain.com|192.168.0.1" # Specify a list of hosts separated by "|" that do not require access through your proxy server.
例:CATALINA_OPTS=$CATALINA_OPTS -Dhttp.proxyHost=proxy.server.com CATALINA_OPTS=$CATALINA_OPTS -Dhttp.proxyPort=3128 CATALINA_OPTS=$CATALINA_OPTS -Dhttp.nonProxyHosts="localhost|host.mydomain.com|192.168.0.1"
プロキシ設定の詳細は、https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.htmlをご覧ください。 - Tomcatサーバーを再起動します。