重新配置 ThingWorx Flow 設定參數
如果您在安裝 ThingWorx Flow 時輸入了不正確的值並想要修改值,則需要依據下列幾部份內容的詳細說明重新配置 ThingWorx Flow 設定參數:
非 HA 環境
重新配置 ThingWorx 主機與埠
◦ 在 <Nginx 安裝>\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 安裝>\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 環境
重新配置 HA Proxy 與埠
◦ 重新配置 HA Proxy。
◦ 在 <Nginx 安裝>\conf\conf.d\vhost-flow.conf 檔案的下列 location 物件下,將 proxy_pass 參數的值更新為新的 HA Proxy 主機名稱與埠號:
▪ /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 參數的值更新為新的 HA Proxy 主機名稱與埠號。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 檔案中,將 ENDPOINT 與 UI_ENDPOINT 參數的值更新為新的 HA Proxy 主機名稱與埠號。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\trigger\deploymentConfig.json 檔案中,將 DOMAIN 與 TRIGGER_HOST 參數的值更新為新的 HA Proxy 主機名稱與埠號。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\lookup\deploymentConfig.json 檔案中,將 ENDPOINT 參數的值更新為新的 HA Proxy 主機名稱與埠號。
◦ 在 <ThingWorx_Flow_Install_Location>\modules\oauth\deploymentConfig.json 檔案中,更新 WHITE_LIST_DOMAINS 區段中 HA Proxy 伺服器的值。
重新配置 HA Nginx 主機與埠
◦ 重新配置 HA Proxy 以指向新的 Nginx 伺服器。
◦ 在 <Nginx 安裝>\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