introduce
- Today I will teach you a simple way to deploy your website for others to visit; Of course, there are many ways, here I only introduce one of them, which is the easiest to use; So let’s start with
Tencent cloud
Step by step operation as an example; If you use AliYun, the approach is similar
1. Open object storage
- First log in to the console of Tencent Cloud to open object storage
2. Create a bucket
3. Upload files
- Upload your website file, either a Vue or react package file. Here I upload a test HTML file and enter the details
4. Copy links
- Copy the object’s address, paste it in the browser address bar, or send it to a friend
5, effects,
- The site opens successfully, and at this point the site is deployed successfully
Supplementary (the following content is optional)
Then you will find that the link is too long to remember, so let's configure a domain name for this page. Domain name purchase and record here do not repeat, move
Tencent Official Documents. The following is provided if you have a registered domain name
6. Migration path
- I changed test.html to index.html for specification,
Put index.html in the Hello folder
7. Configure static websites
- Open the menu on the left
A static web site
Set the index document to the path where your index.html is located. In this case, it’s in the Hello folder so set it to Hello /index.html.
8. Customize the source domain name
- Open the left menu of domain name and Transport management, find inside
Customize the source domain name
, click Add Domain name, enter your domain name in the input box, and set the source site type toStatic site source site
, copyCNAME
The value will be useful later, so click Save.
9. Go to the domain name resolution page
- Click Resolve in the domain name list to enter the resolution page
10. Add parse records
- Click Add Record and select host record
The WWW or @
There are two records, a WWW, that can be passedwww.gongyaotw.cn
Access; The other one is at sign, configured to passgongyaotw.cn
Access; Therefore, the preceding two records are generally configured. Record type selectionCNAME
; The record value is the CNAME value that we copied in step 8 and paste it in. Click Save
11, save,
- I have added two record values here. When you save it, you will be reminded that it takes 10 minutes to take effect, but it usually takes 1-5 minutes
12. Open the domain name
- Open the
gongyaotw.cn
andwww.gongyaotw.cn
Perfect!!