手順
- 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"
認証付きプロキシを使用する場合は、<tomcat_path>/WEB-INF/configuration.properties
ファイルに移動して以下の行をコメント解除します。- 認証付きプロトコル:
#http.proxyUser=someuser #http.proxyPassword=somepassword
- 認証付きHTTPSプロトコル:
#https.proxyUser=someuser #https.proxyPassword=somepassword
- 認証付きプロトコル:
- Tomcatサーバーを再起動します。