About Alibaba Cloud OSS Server Binding Domain Name and Https Certificate

This is a front-end blogger without routines. He is keen on all kinds of front-end oriented operations. He often writes wherever he thinks. If you are interested in technology and front-end effects, you can leave a message~ The blogger will step on the pit for everyone after seeing it. The~
homepage:  Oliver Yoon's homepage
Motto: Get up when you fall~

About Alibaba Cloud OSS Server Binding Domain Name and Https Certificate

I. Introduction

2. Preparation stage

3. Create Bucket

4. Bind domain name

5. Add HTTPS certificate

Notice

6. Summary


I. Introduction

Regarding what is an OSS server, there are many professional articles on the Internet that explain it, and you can read it yourself. This article does not involve relevant analysis;

Simply put, the OSS server can be used for some static resources in the project, such as pictures, files, etc.; if these resources are stored on the project server together with the project, there may be some impact when accessing them, especially Bandwidth; therefore, these static resources are stored separately, and the server only interacts with some APIs;

2. Preparation stage

All the materials in this example are applied on Alibaba Cloud, and the content that needs to be prepared is roughly as follows:

  • 1 OSS server , Alibaba Cloud application, can be used for free for 3 months, 20G capacity;
  • A registered domain name , which can be a first-level domain name or a second-level domain name ;
  • An https certificate can be applied for free on Alibaba Cloud, valid for one year;

3. Create Bucket

  • Open the Alibaba Cloud console and find the object storage OSS ;

  • Click " Bucket List " on the left menu, and click "Create Bucket "; (PS: This Bucket is a bit like a container or a directory, the purpose is to store resources in this Bucket)

  • According to individual needs, select the corresponding configuration, generally speaking, the default is enough , if there are special conditions, it can be customized;

  • After the creation is complete, there will be one more record in the list, which is the Bucket we just created;

4. Bind domain name

  • Click on the newly created Bucket to enter the Bucket settings interface, click on the left menu "Bucket Configuration" -> "Domain Name Management"

Click " Bind Domain Name " and enter the specific domain name that needs to be bound; (PS: Note that if the second-level domain name is bound at this time , the HTTPS certificate that will be added later must match the domain name , otherwise the binding is not valid. will succeed )

  • If it is the domain name of Alibaba Cloud, you can turn on " Automatically add CNAME records ". If the automatic addition is not turned on here, you need to enter the domain name resolution to add it manually;
  • Click "OK", and a record will appear in the domain name list, which points the Bucket to the bound domain name;

5. Add HTTPS certificate

  • Click " Certificate Hosting " on the back of the domain name just configured ;

  • If your certificate is applied in Alibaba Cloud, you can directly select the certificate in the drop-down menu. If the certificate is applied elsewhere, you can upload the certificate to the domain name through the "upload function"

Notice

If your certificate is applied for in Alibaba Cloud, but the certificate is not displayed in the drop-down menu, it is likely that the domain name bound to the certificate is inconsistent with the domain name bound in your Bucket ;

For example, the domain name bound to the certificate is: www.baidu.com, but the domain name you bound to the Bucket is oss.baidu.com. You must know that these are two domain names, and they are for the second-level domain name oss.baidu. com, you also need to apply for a certificate separately , otherwise it cannot be used;

  • After the selection or upload is successful, it means that the binding is successful, and the OSS service can be used at this time;

6. Summary

In the actual operation, I took some detours, mainly because I didn’t figure out that the second-level domain name also needs a separate https certificate, so I would like to record it~

Guess you like

Origin blog.csdn.net/zy21131437/article/details/131949290