cloud.tencent.com is used as an example.glassfish-4.0 version is used as an example.443 on the GlassFish server so that HTTPS can be enabled after the certificate is installed. For more information, see How Do I Enable Port 443 for a VM?.Name | Description |
Server IP address | IP address of the server, which is used to connect the PC to the server. |
Username | The username used to log in to the server. |
Password | The password used to log in to the server. |
.pfx or .jks certificate file is not provided. Instead, you need to manually convert the format to generate a keystore as follows:.jks certificate./usr/share directory.cloud.tencent.com certificate file package to a local directory.
After decompression, you can get the certificate files of the corresponding types, which include the cloud.tencent.com_apache and cloud.tencent.com_jks folders.cloud.tencent.com_apachecloud.tencent.com.crt: Certificate filecloud.tencent.com.key: Private key filecloud.tencent.com.csr file/usr/share/glassfish4/glassfish/bin directory, run the ./asadmin command, and run the change-master-password --savemasterpassword=true domain1 command to change the domain administrator password as shown below:domain1 service is /usr/share/glassfish4/glassfish/domains. Enter the domain according to the actual situation.changeit. Press Enter and enter the new password, which should be the private key password you set when applying for the certificate.keystorePass.txt file in the cloud.tencent.com_jks folder./usr/share directory, run the mkdir temp command to create the temp folder.cloud.tencent.com.crt and the private key file cloud.tencent.com.key from the local directory to the temp folder.temp folder, run the following command to generate the PKCS12 file. When the system prompts you for a password during the process, enter the new password, which is the private key password.openssl pkcs12 -export -in cloud.tencent.com.crt -inkey cloud.tencent.com.key -out mycert.p12 -name s1as
temp folder, run the ls -l command to check whether the PKCS12 file contains the certificate you applied for.temp folder, run the following command to generate the keystore.jks file:keytool -importkeystore -destkeystore keystore.jks -srckeystore mycert.p12 -srcstoretype PKCS12 -alias s1as
temp folder, run the following command to generate the cacert.jks file. When the system prompts you for a password during this process, enter the new password, which is the private key password.keytool -importcert -trustcacerts -destkeystore cacerts.jks -file cloud.tencent.com.crt -alias s1as

keystore.jks and cacert.jks files in the domain1/config directory with the files generated in steps 9 and 10./usr/share/glassfish4/glassfish/domains/domain1/config directory, change the port numbers in the domain.xml file.<network-listeners><network-listener port="80" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener><network-listener port="443" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener><network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener></network-listeners>
https://cloud.tencent.com.

Feedback