- What's New
- Function Overview
-
Product Bulletin
- [January 23, 2025] CAs Suspend OV and EV SSL Certificate Approval and Issuance During the Spring Festival
- [December 24, 2024] CA Venders Suspend Certificate Issuance During Christmas and New Year's Day
- [October 28, 2024] Notice on Switching the DigiCert Root Certificate
- [July 29, 2024] Notice on DigiCert and GeoTrust SSL Certificate Price Changes
- [October 8, 2023] Validity Period Change of Test Certificates
- [April 17, 2023] Changing GeoTrust DV to RapidSSL DV
- [Feb 8, 2023] Notice on DigiCert Root Certificate Update
- [December 16, 2022] DigiCert and GeoTrust Suspend OV and EV Certificate Validation During Christmas Holidays
- [September 13, 2022] SSL Certificate Chains Embedded in Applications May Cause Communication Failures
- [July 25, 2022] Organization Unit (OU) Field Removed from SSL Certificates
- [March 23, 2022] SSL Certificate Manager Entry Will Be Changed on March 25, 2022
- [Product Notices] Huawei Cloud SCM Domain Ownership Verification Policy (File-based Verification) Changed on Nov 12, 2021
- [August 20, 2020] Notice on the Change of the Maximum Validity Period of SSL Certificates
- [August 14, 2020] Notice on Delaying Issuance of EV and EV Pro Certificates Due to the DigiCert System Failure
- [July 27, 2020] CAs Will No Longer Issue Two-Year SSL Certificates
- [July 27, 2020] Notice on Revocation of DV Certificates by CAs
- [July 19, 2020] DigiCert System Maintenance Notice
- [May 31, 2020] GlobalSign System Maintenance Notice
- [May 3, 2020] DigiCert System Maintenance Notice
- [April 26, 2020] Symantec Certificate Brand Change Notice
- Service Overview
- Billing
- Getting Started
-
SSL Certificate Manager (SCM) User Guide
- About SCM and SSL Certificate Usage
- Purchasing an SSL Certificate
- Applying for an SSL Certificate
-
Installing an SSL Certificate
-
Installing an SSL Certificate on a Web Server
- Downloading an SSL Certificate
- Downloading a Root Certificate
- Installing an SSL Certificate on a Tomcat Server
- Installing an SSL Certificate on an Nginx Server
- Installing an SSL Certificate on an Apache Server
- Installing an SSL Certificate on an IIS Server
- Installing an SSL Certificate on a WebLogic Server
- Installing an SSL Certificate on a Resin Server
- Deploying an SSL Certificate to Other Huawei Cloud Products
-
Installing an SSL Certificate on a Web Server
-
Managing SSL Certificates
- Reissuing an SSL Certificate
- Unsubscribing from an SSL Certificate
- Renewing an SSL Certificate
- Revoking an SSL Certificate
- Re-applying for a Revoked SSL Certificate
- Deleting an SSL Certificate from CCM
- Uploading an External Certificate to SCM
- Adding an Additional Domain Name
- Withdrawing an SSL Certificate Application
- Canceling Authorization for Privacy Information
- Pushing an SSL Certificate to Other Cloud Services
- Viewing Details About an SSL Certificate
- Viewing the Application Progress
- CSRs
- Sharing
- Managing Tags
- Permissions Management
- Private Certificate Authority (PCA) User Guide
-
Best Practices
- CCM Best Practice Summary
- Best Practices for SSL Certificate Manager
- Best Practices for Private Certificate Management
-
API Reference
- Before You Start
- Calling APIs
- API Overview
- API Description
- Examples
-
Historical APIs
-
SCM APIs
- Purchasing an SSL Certificate
- Querying the Certificate List
- Querying Details of a Certificate
- Modifying a Certificate
- Querying the Product Type of a Certificate
- Querying the Product Details of a Certificate
- Applying for a Certificate
- Verifying a CSR
- Saving Certificate Information
- Reading the Information Entered When Applying for a Certificate
- Canceling an Application
- Deleting a Certificate
- Uploading Authentication Information
- Downloading a Certificate
- Uploading a Certificate
- Revoking a Certificate
- Pushing a Certificate
- Querying Push Records
- Canceling Authorization for Privacy Information
- Adding an Additional Domain Name
- Querying Domain Name Verification Information
-
SCM APIs
- Permissions and Supported Actions
- Appendix
- Change History
- SDK Reference
-
FAQs
-
Certificate Consulting
- What Are the Differences Between SSL Certificate Manager and Private Certificate Authority?
- Which Websites Require HTTPS?
- What Are the Differences Between HTTPS and HTTP?
- What Is a Public Key and a Private Key?
- What Are the Relationships Between a Public Key, Private Key, and Digital Certificate?
- Why Is a Non-Password-Protected Private Key Required?
- What Are Mainstream Formats of Digital Certificates?
- What Information Does an SSL Certificate Contain?
- Can I Use SSL Certificates for Other Regions, Accounts, or Platforms?
- Can I Use an Unused SSL Certificate Anytime I Want?
- Can SSL Certificates Be Upgraded?
- Does the SSL Certificate Have Restrictions on the Server Port?
- Why Is SCM Inaccessible or the Operation Button Grayed Out When I Access the SCM Console?
- Regions and AZs
-
SSL Certificate Application and Purchase
- SSL Certificate Selection
-
About Required Domain Name Details
- How Do I Enter a Domain Name for a Certificate When Applying for an SSL Certificate?
- What Are the Differences Between a Single-Domain Name, Multi-Domain Name, and Wildcard-Domain Name in SCM?
- What Is the Relationship Between a Domain Name and an SSL Certificate?
- What Domains Can Wildcard-Domain Certificates Support?
- What Domain Name Should I Use to Apply for an SSL Certificate?
- Can I Change the Primary Domain Name Associated with a Certificate?
- Does the Relationship Between the Primary Domain Name and Additional Domain Name Have Any Impact on Domain Names?
- How Do I Make a CSR File?
- What Are the Differences Between the CSR Generated by the System and the CSR Made by Yourself?
- How Do I Export a CSR File?
- Domain-related Concepts
- Problems Related to Domains
- About Required Information
-
Troubleshooting
- What Can I Do If I Encounter a Problem When Purchasing, Applying for, Installing, or Using a Free SSL Certificate?
- What Can I Do If the Submit Button Is Unavailable?
- Can I Change Certificate Information After I Submit a Certificate Application?
- What Can I Do If I Encounter a Problem During SSL Certificate Application?
- About Test Certificates
-
Domain Name Ownership Verification
- How Do I Verify Domain Ownership?
- How Do I Verify the Domain Ownership Manually by DNS?
- How Do I Perform Verification by File?
- How Do I Perform Verification by Email?
- How Do I Check Whether Domain Name Verification Takes Effect?
- How Can I Check Whether DNS Verification Takes Effect for Windows OSs?
- What Can I Do If Domain Ownership Verification Does Not Take Effect?
- How Do I Query a Domain Name Provider?
- How Do I Query and Verify the Email Address of the Domain Administrator?
- How Do I Use DNS to Verify Domains Not Hosted on Huawei Cloud?
- Why Does the SSL Certificate Remain in the Pending Domain Name Verification State (Application Progress Is 40%) After Domain Name Verification Is Complete?
- How Do I Change the Domain Name Verification Mode When the SSL Certificate Status Is Pending domain name verification?
- What Do I Do If DNS Verification for a DV Certificate Fails?
-
SSL Certificate Approval
- How Long Does It Take to Approve an SSL Certificate?
- Why Does the Certificate Stay in the CA Verifying Status for a Long Time?
- What Can I Do After I Submit an SSL Certificate Application?
- How Do I Handle the Email or Phone Call from the CA?
- Do I Need to Get a Newly Purchased SSL Certificate Approved?
- What Can I Do When I Fail to Pass the Security Review?
- What Can I Do When a Message Indicating Approval Failure Due to Blank Main Domain Name Is Displayed?
-
SSL Certificate Download, Installation, and Use
- SSL Certificate Download
-
SSL Certificate Installation
- On Which Servers Can an SSL Certificate Be Deployed?
- How Do I Install an SSL Certificate on a Server?
- How Do I Check Whether the Deployed SSL Certificate Takes Effect?
- Is the Original SSL Certificate Still Available After a Server IP Address Is Changed?
- In Which Geographical Locations Can an SSL Certificate Be Used?
- How Do I Add an SSL Certificate to the Background of a Website Built by Baota?
- How Do I Solve Problems Related to SSL Certificate Installation or Use?
-
SSL Certificate Use
- How Do I Configure a Non-Huawei Cloud SSL Certificate for a Huawei Cloud Product?
- How Do I Apply an SSL Certificate to Other Huawei Cloud Services?
- Which Region Will a Certificate Be Deployed to When I Deploy an SSL Certificate in CCM to Other Cloud Product?
- Is HTTPS Automatically Enabled After an SSL Certificate Is Deployed to a Cloud Product?
- How Do I Solve the Problem That Occurs When I Use Certificates in WAF, ELB, or CDN?
- Why Is a Message Indicating that the Certificate Chain Is Incomplete Displayed When I Configure HTTPS on CDN?
- Why Is an Error Reported When I Deploy an SSL Certificate with an Uploaded CSR to WAF, ELB, or CDN?
- How Do I Use an SSL Certificate After It Is Issued?
- What Can I Do If My SSL Certificate Cannot Be Deployed to Other Services?
- Issues Related to SSL Certificate Uploading
- What Can I Do If Errors Are Reported When I Upload an SSL Certificate?
-
SSL Certificate Troubleshooting
- What Can I Do If the Browser Displays a Message Indicating that the SSL Certificate Is Untrusted?
- Why Does the Browser Still Consider the Website Insecure While the Website Has an SSL Certificate Deployed?
- Why Is My Website Inaccessible by Domain Name After an SSL Certificate Is Installed?
- Why Does the HTTPS Access Speed Become Slower After an SSL Certificate Is Installed?
- Why Does the Browser Prompt a Not Secure Warning to Visitors After I Configure an SSL Certificate for the Website?
- What Can I Do If the Browser Displays "Your Connection Is Not a Private Connection"?
- Will the Browser Prompt A Warning Indicating the Deployed SSL Certificate Is Not Secure?
-
Certificate Validity Period
- What Can I Do If My SSL Certificate Expired?
- How Long Is an SSL Certificate Valid?
- What Can I Do If an SSL Certificate Is About to Expire?
- How Long Does an SSL Certificate Take Effect After Being Purchased?
- Validity Periods and Replacement of the Current and New SSL Certificates
- How Can I Renew an SSL Certificate?
- How Do I Configure a Certificate Expiration Notification?
- Will Services Be Affected If an SSL Certificate Is Not Updated After It Expires?
- Validity Periods of Private Certificates
- How Long Will an Order Become Invalid If I Do Not Apply for a Certificate After Purchasing It?
- How Do I Know When My Certificate Expires?
- About Billing, Renewal, and Unsubscription
-
Others
-
SSL Certificate Management
- What Are the Differences Between Revoking a Certificate and Deleting a Certificate?
- Can I Withdraw a Certificate Revocation or Deletion Application?
- How Do I Convert a Certificate into the PEM Format?
- How Do I Complete the Certificate File When Uploading a Certificate?
- How Do I Configure a Certificate Chain?
- Why Is the SSL Certificate Not Displayed in the Certificate List?
- How Long Does It Take to Revoke a Certificate?
- Troubleshooting
- About Certificate Use
-
SSL Certificate Management
-
Certificate Consulting
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Overview of Private Certificate Application
- Private CA Management
-
Private Certificate Management
- Applying for a Private Certificate
- Downloading a Private Certificate
-
Installing a Private Certificate
- Trusting a Private Root CA
- Installing a Private Certificate on a Client
-
Installing a Private Certificate on a Server
- Installing a Private Certificate on a Tomcat Server
- Installing a Private Certificate on an Nginx Server
- Installing a Private Certificate on an Apache Server
- Installing a Private Certificate on an IIS Server
- Installing a Private Certificate on a WebLogic Server
- Installing a Private Certificate on a Resin Server
- Revoking a Private Certificate
- Viewing Details of a Private Certificate
- Deleting a Private Certificate
- Permissions Management
- FAQs
- Change History
- API Reference (ME-Abu Dhabi Region)
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Installing a Private Certificate on an Nginx Server
This topic describes how to install a private certificate on an Nginx 1.7.8 server running CentOS 7.
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 has been issued.
- You have downloaded the private certificate in the format that is supported by Nginx. 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
The installation process is as follows (for Nginx 1.7.8 servers running CentOS 7):
Step 1: Obtaining Files → Step 2: Creating a Directory → Step 3: Modifying Configuration Files → Step 4: Verifying the Configuration → Step 5: Restarting Nginx → Verifying the Result
Step 1: Obtaining Files
Decompress the downloaded certificate file on your local PC.
You will obtain certificate file server.crt and private key file server.key.
- The server.crt file contains two segments of certificate code: -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----, which are the server certificate and intermediate CA certificate respectively.
- server.key contains one segment of private key code: -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----.
Step 2: Creating a Directory
Create a cert directory in the Nginx installation directory, and copy the server.key and server.crt files to the cert directory.
Step 3: Modifying Configuration Files
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.
Configure the nginx.conf file in the conf directory of Nginx.
- Find the following configuration:
#server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #}
- Delete comment tags (#) at the beginning of the lines.
server { listen 443 ssl; server_name localhost; ssl_certificate cert.pem; ssl_certificate_key cert.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } }
- Modify the following parameters according to Table 1.
ssl_certificate cert/server.crt; ssl_certificate_key cert/server.key;
The complete configuration is as follows. Modify other parameters based on your needs.
server { listen 443 ssl; # Set the default HTTPS port to 443. If the default HTTPS port is not configured, Nginx may fail to start. server_name www.domain.com; #Replace www.domain.com with the domain name associated with your certificate. ssl_certificate cert/server.crt; #Replace cert/server.crt with the path of the certificate file. ssl_certificate_key cert/server.key; #Replace cert/server.key with the path of the private key. ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; #Encryption suite ssl_prefer_server_ciphers on; location / { root html; #Site directory index index.html index.htm; #Add attributes. } }
NOTICE:
Do not directly copy all configuration. Only attributes starting with ssl are directly related to the certificate configuration. Modify other parameters based on site requirements.
Table 1 Parameters Parameter
Description
listen
SSL access port number. Set the value to 443.
Set the default HTTPS port to 443. If the default HTTPS port is not configured, Nginx may fail to start.
server_name
Domain name which the certificate is used for. Example: www.domain.com
ssl_certificate
Certificate file server.crt
Set the value to the path of the server.crt file. An example of the path is cert/server.crt.
ssl_certificate_key
Private key file server.key
Set the value to the path of the server.key file. An example of the path is cert/server.key.
- Save the configuration file.
Step 4: Verifying the Configuration
Go to the execution directory of Nginx and run the following command:
sbin/nginx -t
nginx.conf syntax is ok nginx.conf test is successful
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot