开启辅助访问

简体中文 繁體中文 English 日本語 Deutsch 한국 사람 بالعربية TÜRKÇE português คนไทย Français

切换到窄版

ZStack知识库

 找回密码
 立即注册
搜索
查看: 51|回复: 0

Record the process of changing the HTTPS certificate on the platform once

[复制链接]

140

主题

166

帖子

2760

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2760
发表于 2025-6-25 13:47:06 | 显示全部楼层 |阅读模式
Problem details: The customer platform needs to replace the HTTPS certificate due to its expiration. The enterprise certificate purchased from Alibaba Cloud contains a compressed file, which contains two files after decompression: a key file and a PEM file. There are pits during the replacement process, please pay attention to them

Processing procedure:
① The customer's certificate has expired and they need to replace it when purchasing a new HTTPS certificate.
② Upload the certificate file to two management nodes and extract a key file and PEM file.
③ Convert PEM files and key files to pkcs12 format (after entering the command, ask for a password and set your own password)
#openssl pkcs12 -export -in ui.keystore.pem -inkey 8121735__scsz.com.key -out test.p12    ( The files highlighted in red are the actual files after decompression
④ Convert the pkcs12 file to PEM format again (prompt to enter the password set in the previous step) (be sure to perform this step and do not replace it with the built-in PEM file, otherwise it will cause the UI service to fail)
#openssl pkcs12 -in test.p12 -out test.pem -nodes
⑤ Query the converted pkcs12 certificate alias
#/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/bin/keytool -list -v -keystore /root/Keystore_Tomcat/test.p12   
⑥ Custom certificate alias, certificate path, certificate type, private key password, HTTPS login port and other information
zstack-ctl config_ui --enable-ssl True --ssl-keyalias=1 --ssl-keystore=/root/Keystore_Tomcat/test.p12 --ssl-keystore-type=PKCS12 --ssl-keystore-password=password --server-port=5443
⑦ Upload the converted pkcs12 file and PEM file to the default directory
#cp test.p* /usr/local/zstack/zstack-ui/   
⑧ Modify the zstack. properties configuration file to set the certificate path to an absolute path, and then start the management service.
#consoleProxyCertFile = /usr/local/zstack/zstack-ui/test.pem

Problem summary: Decompressing the PEM file and replacing it will cause Nginx service to fail to start, Nginx to fail to start, and UI to fail to start. This should be noted
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|ZStack知识库

GMT+8, 2026-8-31 12:53 , Processed in 0.043982 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表