配置 Tomcat 使用代理服务器 - 7.2

Talend Data Integration 安装指南,适用于:Linux

EnrichVersion
7.2
EnrichProdName
Talend Data Integration
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend Identity and Access Management
Talend Installer
Talend JobServer
Talend Log Server
Talend Runtime
Talend Studio
task
数据治理

过程

  1. 停止 Tomcat 服务器。
  2. 设置配置。配置文件为 <TomcatPath>/bin/setenv.sh。如果该文件不存在,则创建它。
  3. 添加以下参数,即可更改参数以匹配配置:
    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
  4. 重新启动 Tomcat 服务器。