重新配置 ThingWorx Flow 设置参数
如果在安装 ThingWorx Flow 时输入了不正确的值,并且想要修改此值,则需要重新配置以下各部分中详述的 ThingWorx Flow 设置参数:
非 HA 环境
重新配置 ThingWorx 主机和端口
◦ 在 <Nginx Install>\conf\conf.d\vhost-flow.conf 文件中的以下 location 对象下,将 proxy_pass 参数的值更新为新的 ThingWorx 服务器和端口号:
▪ /Thingworx/WS
▪ /Thingworx/RemoteTunnel
▪ /Thingworx/WSTunnelClient/
▪ /Thingworx/WSTunnelServer/
▪ /Thingworx
◦ 在 <ThingWorx_Flow_Install_Location>\modules\ux\deploymentConfig.json 文件中,将 twx_endpoint 参数的值更新为新的 ThingWorx 服务器名称和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 文件中的 WHITE_LIST_DOMAINS 部分中,更新 ThingWorx 服务器的值。
重新配置 Nginx 主机和端口
◦ 在 <Nginx Install>\conf\conf.d\vhost-flow.conf 文件中,将 server_name 参数的值更新为新的 Nginx 服务器名称和监听端口,以及将 $ssl_port 参数更新为新的 Nginx 端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 文件中,将 WHITE_LIST_DOMAINS 参数的值更新为新的 Nginx 服务器名称,以及将 UI_ENDPOINT 和 ENDPOINT 参数的值更新为新的 Nginx 服务器名称和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\lookup\deploymentConfig.json 文件中,将 ENDPOINT 参数的值更新为新的 Nginx 服务器名称和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\trigger\deploymentConfig.json 文件中,将 DOMAIN 和 TRIGGER_HOST 参数的值更新为新的 Nginx 服务器名称和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\ux\deploymentConfig.json 文件中,将 host、prefix_url、api_endpoint、oauth_server 和 service_api_endpoint 参数的值更新为新的 Nginx 服务器名称和端口号。
重新配置数据库主机和端口
更新以下文件中 client、host、port、db_name 和 ssl 参数的值:
◦ <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\lookup\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\trigger\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\ux\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\exchange\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\db_seed\migration_config.json
HA 环境
重新配置 HAProxy 和端口
◦ 重新配置 HAProxy。
◦ 在 <Nginx Install>\conf\conf.d\vhost-flow.conf 文件中的以下 location 对象下,将 proxy_pass 参数的值更新为新的 HAProxy 主机名和端口号:
▪ /Thingworx/WS
▪ /Thingworx/RemoteTunnel
▪ /Thingworx/WSTunnelClient/
▪ /Thingworx/WSTunnelServer/
▪ /Thingworx
◦ 在 <ThingWorx_Flow_Install_Location>\modules\ux\deploymentConfig.json 文件中,将 api_endpoint、oauth_server、service_api_endpoint 和 twx_endpoint 参数的值更新为新的 HAProxy 主机名和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 文件中,将 ENDPOINT 和 UI_ENDPOINT 参数的值更新为新的 HA 代理主机名和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\trigger\deploymentConfig.json 文件中,将 DOMAIN 和 TRIGGER_HOST 参数的值更新为新的 HAProxy 主机名和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\lookup\deploymentConfig.json 文件中,将 ENDPOINT 参数的值更新为新的 HAProxy 主机名和端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 文件中的 WHITE_LIST_DOMAINS 部分,更新 HAProxy 服务器的值。
重新配置 HA Nginx 主机和端口
◦ 重新将 HAProxy 配置为指向新的 Nginx 服务器。
◦ 在 <Nginx Install>\conf\conf.d\vhost-flow.conf 文件中,将 server_name 参数的值更新为新的 Nginx 服务器名称和监听端口,并将 $ssl_port 参数设置为新的 Nginx 端口号。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 文件中,将 WHITE_LIST_DOMAINS 参数的值更新为新的 Nginx 服务器名称。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\ux\deploymentConfig.json 文件中,将 host 和 prefix_url 参数的值更新为新的 Nginx 服务器名称。
重新配置数据库主机和端口
更新以下文件中 client、host、port、db_name 和 ssl 参数的值:
◦ <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\lookup\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\trigger\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\ux\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\exchange\deploymentConfig.json
◦ <ThingWorx_Flow_Install_Location>\modules\db_seed\migration_config.json