1. 請確保 CRT 檔案受憑證授權單位信任,且為 base-64 編碼。
2. 停止 ThingWorxFlowNginx 服務。
3. 導覽至下列路徑:
<ThingWorx Flow 安裝目錄>\SSL
4. 將下列檔案複製到備份資料夾以進行恢復:
◦ orchestration.crt
◦ orchestration.key
◦ extra.crt
◦ nginx-keyfile
5. 以 CRT 檔案的內容取代 orchestration.crt 檔案的內容。此檔案可能包含 PEM 格式的完整鏈憑證,順序如下:伺服器、中間和根。如需詳細資訊,請參閱以下註記。
| 除了網站憑證外,可能還需要將 CA 根以及所有中間憑證包括在鏈中。 鏈中憑證的順序必須如下所示: a. 鏈中的第一個檔案必須是您的網域憑證。 b. 鏈中的第二個憑證必須是憑證頒發者的憑證,以此類推,直到根憑證。 例如: -----BEGIN CERTIFICATE----- (Your Primary SSL certificate: your_domain_name.crt) -----END CERTIFICATE---- -----BEGIN CERTIFICATE----- (Your Intermediate certificate: DigiCertCA.crt) -----END CERTIFICATE---- ------BEGIN CERTIFICATE---- (Your Root certificate: TrustedRoot.crt) -----END CERTIFICATE----- | 此處的檔案名僅用作範例。如需詳細指示,請參閱 CA 網站,以瞭解如何為 SSL 憑證安裝建立 .pem 檔案。 |
|
6. 將 orchestration.crt 複製到 extra.crt 檔案。請確定 orchestration.crt 與 extra.crt 檔案相同。
7. (選用) 出於安全性原因,建議變更加密金鑰。開啟 nginx-keyfile 檔案以取得目前的加密金鑰值,並予以變更。值可以是任何字串。
8. 使用 KeyStore 檔案總管或 openssl,加密私人金鑰:
openssl rsa -aes256 -passout pass:<password in nginx-keyfile> -in <private.key> -out <encrypted_orchestration.key>
其中:
private.key - 私人金鑰檔案的檔案路徑
encrypted_orchestration.key - 指令輸出必須用於儲存加密私人金鑰的檔案路徑
即會建立新檔案 encrypted_orchestration.key。
9. 以 encrypted_orchestration.key 檔案內容取代 orchestration.key 檔案的內容。
10. 啟動 ThingWorxFlowNginx 服務。
| 如果建立了自我簽署憑證 (例如在取代過期的自我簽署憑證時),而不是 CA 簽署的憑證,請參閱 再生自我簽署憑證。 |
1. 停止 ThingWorxFlowNginx 服務。
2. 在 Keystore Explorer 中開啟 Tomcat keystore.jks 檔案。
3. 在金鑰組上按一下滑鼠右鍵,然後選取 > 。
4. 輸入 Tomcat Key Pair Alias Password,然後按一下 OK。
5. 選取 OpenSSL 類型。
6. 在欄位中輸入 encryption password 與 PEM password。
7. 瀏覽至任意位置,然後按一下 Export。
| 這是 orchestration.key。 在 步驟 (6) 中建立的密碼會複製到 nginx-keyfile 目錄。 |
8. 在金鑰組上按一下滑鼠右鍵,然後選取 Export Certificate Chain。
9. 瀏覽至任意位置,然後按一下 Export。
| 此檔案為 orchestration.crt,且包含伺服器憑證。 |
10. 瀏覽至 ThingWorx Flow installation directory/SSL。
11. 將此資料夾中的所有檔案移至備份資料夾。
12. 將下列檔案複製到 ThingWorx Flow installation directory/SSL:
◦ orchestration.crt - 在
步驟 (9) 建立。包含伺服器憑證。
◦ orchestration.key - 在
步驟 (7) 建立。
◦ nginx.keyfile - 在匯出私人金鑰時,以
步驟 (6) 中指定的密碼取代檔案內容。
◦ extra.crt - 將 orchestration.crt 複製到 extra.crt 檔案。複製之後,請確定 orchestration.crt 與 extra.crt 檔案相同。此檔案包含 PEM 格式的完整鏈憑證,順序如下:伺服器、中間和根。
13. 啟動 ThingWorxFlowNginx 服務。