Installing a Private Certificate on a Resin Server
This topic describes how to install a private certificate on a Resin server.
The installation procedure in this topic is for your reference only as the commands executed and configuration file modified during the installation may vary depending on OS types and server configurations.
Prerequisites
- The certificate is in the Issued status.
- You have downloaded the private certificate in the format that is supported by Tomcat. For details, see Downloading a Certificate.
- You have used a system-generated CSR to apply for the certificate.
Constraints
- Before installing the certificate, enable port 443 on the server where the private certificate is installed and add port 443 to the security group. Otherwise, HTTPS cannot be enabled after the installation.
- A root CA must be added to the trusted client CA list so that all server certificates issued by the root CA can be trusted by the client. For details, see Trusting a Private Root CA.
- If a domain name maps to multiple servers, deploy the certificate on each server.
- A private certificate can only be installed on the server that maps to the domain name associated with the certificate. Otherwise, the web browser will display a message indicating that the domain name is insecure.
Procedure
To install a private certificate on a Resin server, perform the following steps:
Step 1: Obtaining Files → Step 2: Configuring Resin → Verifying the Result
Step 1: Obtaining Files
Decompress the downloaded Tomcat certificate file to obtain the certificate file server.jks and password file keystorePass.txt.
Step 2: Configuring Resin
Before modifying the configuration file, back up the configuration file. You are advised to deploy the configuration file in the test environment and then configure it on the production environment to avoid service interruptions caused by incorrect configurations.
- (Optional) Install Resin.
If you have installed Resin, skip this step.
- Log in to the Resin official website and download the appropriate application packages for your operating system.
The following uses Resin-4.0.38 for Windows as an example.
- Decompress the downloaded Resin software package.
- Access the root directory of Resin-4.0.38 and find the resin.exe file.
- Run the resin.exe file. During the execution, the command prompt window Figure 1 will display.
- After the resin.exe file is executed. Start the Microsoft Internet Explorer, enter the default address http://127.0.0.1:8080 of Resin in the address bar, and then press Enter.
If the information similar to Figure 2 is displayed, Resin is installed successfully.
- Log in to the Resin official website and download the appropriate application packages for your operating system.
- Modify the configuration file.
- Find the following parameters in the Resin.properties configuration file in the Resin installation directory (the configuration file may be resin.xml for different Resin versions):
# specifies the --server in the config file # home_server : app-0 # Set HTTP and HTTPS bind address # http_address : * # Set HTTP and HTTPS ports. # Use overrides for individual server control, for example: app-0.http : 8081 app.http : 8080 # app.https : 8443 web.http : 8080 # web.https : 8443
- Delete the comment symbol (#) before app.https and web.https. Then modify port 8443 to 443. After the modification:
app.https and web.https: Port to be used on the server. You are advised to set the value to 443.
# specifies the --server in the config file # home_server : app-0 # Set HTTP and HTTPS bind address # http_address : * # Set HTTP and HTTPS ports. # Use overrides for individual server control, for example: app-0.http : 8081 app.http : 8080 app.https : 443 web.http : 8080 web.https : 443
- Find the following parameters and delete the comment symbol (#) before jsse_keystore_type, jsse_keystore_file, and jsse_keystore_password.
# JSSE certificate configuration # Keys are typically stored in the resin configuration directory. jsse_keystore_tye : jks jsse_keystore_file : cert/server.jks jsse_keystore_password: certificate password
- Modify certificate-related parameters. For details, see Table 1.
# JSSE certificate configuration # Keys are typically stored in the resin configuration directory. jsse_keystore_tye : jks jsse_keystore_file : cert/server.jks jsse_keystore_password: certificate password
Table 1 Description Parameter
Description
jsse_keystore_tye
Type of the Keystore file. Generally, this parameter is set to jks.
jsse_keystore_file
Path for storing the server.jks file. The value can be an absolute path or a relative path. Example: cert/server.jks
jsse_keystore_password
Password of server.jks. Set this parameter to the password provided in the keystorePass.txt file.
NOTICE:If the password contains &, replace it with & to avoid configuration failure.
An example command is provided as follows:
If the password is keystorePass="Ix6&APWgcHf72DMu", change it to keystorePass="Ix6&APWgcHf72DMu".
- Save the configuration file.
- Find the following parameters in the Resin.properties configuration file in the Resin installation directory (the configuration file may be resin.xml for different Resin versions):
- Restart Resin.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.