安裝與升級 > 安裝與組態指南 > 進階組態 > 使用其他選項配置 PTC HTTP Server 與 Embedded Servlet Engine > 遠端安裝 PTC HTTP Server 時的組態
  
遠端安裝 PTC HTTP Server 時的組態
如果您選擇在遠端系統 (Windchill 以外的電腦,又稱為分割組態) 上執行 PTC HTTP Server,那麼 PTC HTTP Server 必須能夠辨識 Windchill 組態環境的變更,且 PTC HTTP Server 使用者帳號必須擁有 Windchill codebase 目錄的讀取權限。當 Windchill 組態中發生變更並對執行環境產生影響時,變更不會自動套用至 PTC HTTP Server 安裝。接下來,您必須以最新的 Windchill 環境設定手動更新 PTC HTTP Server
無論何時修改 Embedded Servlet Engine 及 Windchill 組態檔案 (例如安裝或修改 Windchill 應用程式時),都必須將 PTC HTTP Server 更新為 Windchill 安裝的變更。在 Windchill 應用程式安裝期間,會捕捉安裝的特殊環境設定並將其套用至 Embedded Servlet Engine 與 Windchill 組態檔案。因此,對於要由 PTC HTTP Server 辨識的相同變更而言,必須將組態檔案複製到 PTC HTTP Server 電腦並使用 Ant 更新。
理論上,這些指示應在安裝任何 Windchill 應用程式之後執行,藉以捕捉對 Windchill 組態所進行的最新變更。但是,如果您要安裝一組 Windchill 產品,則您只需要在安裝所有 Windchill 產品 (或安裝了其中一個群組) 之後執行這些指示,以捕捉最新的環境變更。
欲實行這些指示,您將要使用 PTC HTTP Server Ant 公用程式。
1. 使用 PTC HTTP Server 安裝程式及提供來執行安裝的指示安裝 PTC HTTP Server
2. 針對要安裝 PTC HTTP Server 的電腦安裝及配置 PTC HTTP Server Ant。請參閱設定 PTC HTTP Server Ant
3. 將 <Windchill>/apacheConf/config 目錄及 <Windchill>/apacheConf/config-WHC 目錄的內容複製到在 PTC HTTP Server 電腦上選擇的目錄。
apacheConf/config 和 apacheConf/config-WHC 目錄中包含 Embedded Servlet Engine 與 Windchill 的組態檔案。這些檔案的內容是動態的,會變更以容納 Windchill 應用程式的安裝。
4. 針對符合您的網站需求的 PTC HTTP Server 建立 Windchill Codebase 目錄的共用檔案系統。有許多方法可以建立共用檔案系統,請使用適合您的網站的方法。目標是要允許 PTC HTTP Server 存取 Windchill Codebase 目錄的內容。
設定共用檔案系統的存取權,使 PTC HTTP Server 使用者帳號擁有 Windchill Codebase 和「Windchill 說明中心」目錄的讀取權限。例如:
Windows:C:\ptc\Windchill_<發行版本_層級>\codebase 與 C:\ptc\Windchill_<發行版本_層級>\WHC (其中 C:\ptc\Windchill_<發行版本_層級> 是 Windchill 的預設安裝目錄)
UNIX:/opt/ptc/Windchill_<發行版本_層級>/codebase 與 opt/ptc/Windchill_<發行版本_層級>/WHC (其中 /opt/ptc/Windchill_<發行版本_層級> 是 Windchill 的預設安裝目錄)
5. 執行下列步驟,將最新的 Embedded Servlet Engine、Windchill 和「Windchill 說明中心」變更套用到 PTC HTTP Server
將目錄變更至您在 PTC HTTP Server 電腦上複製 apacheConf/config 檔案的位置,並執行下列 Ant 指令 (每一行一個完整字串)
ant -f applyApacheWebAppConfig.xml -DAPACHE_HOME=<file path to Apache installation> -DdocBase=<file path to Windchill codebase>
將目錄變更至您在 PTC HTTP Server 電腦上複製 apacheConf/config-WHC 檔案的位置,並執行下列 Ant 指令 (每行一個完整字串)
ant -f applyApacheWebAppConfig.xml -DAPACHE_HOME=<file path to Apache installation> -DdocBase=<file path to Windchill WHC> –DdisableAJP=true
在 PTC HTTP 伺服器與內嵌的 Servlet Engine 之間配置遠端通訊
依預設,PTC 內嵌的 Servlet Engine 僅會回應本機資料傳輸。為了配置遠端 web PTC HTTP 伺服器,必須執行下列步驟:
Servlet Engine 主機名稱與連接埠利用在 <HTTPSERVER_首頁> 中執行下列指令進行配置
ant -f config.xml configureAJPWorkers -DAJP_HOST=<tomcat_host>
-D AJP_PORT=<tomcat_listening_port>
PTC 內嵌的 Servlet Engine 聆聽位址,可利用在 <WT_首頁>/tomcat 目錄內的下列指令配置:
ant -DajpAddress=<IP address of interface to listen on> -f config.xml configureConnectors
<要聆聽的介面 IP 位址> 可以是在全部介面上聆聽的空白字串 (“”)。
PTC HTTP 伺服器與內嵌的 Servlet Engine 應配置為使用共用的秘密數據。您可以下列指令執行:
針對 PTC HTTP 伺服器,可在 <HTTPSERVER_首頁> 內執行下列指令: ant -DajpRequiredSecret=<secret value> -f config.xml configureAJPWorkers
針對內嵌的 Servlet Engine ,請執行在 <WT_首頁>/Tomcat 內的指令:ant -DajpRequiredSecret=<secret value> -f config.xml configureConnectors
<秘密值> 在這兩種情況下皆必須是相同字串。